mink/webdriver-classic-driver

W3C WebDriver Classic driver for Mink framework

Installs: 7 186

Dependents: 1

Suggesters: 0

Security: 0

Stars: 3

Watchers: 6

Forks: 5

Open Issues: 11

Language:JavaScript

Type:mink-driver

1.1.1 2024-12-03 13:20 UTC

README

Latest Stable Version Latest Unstable Version Total Downloads CI License codecov

Usage Example

<?php

use Behat\Mink\Mink,
    Behat\Mink\Session,
    Mink\WebdriverClassicDriver\WebdriverClassicDriver;

require_once __DIR__ . '/vendor/autoload.php';

$browserName = 'firefox';
$url = 'http://example.com';

$mink = new Mink(array(
    'webdriver-classic' => new Session(new WebdriverClassicDriver($browserName)),
));

$session = $mink->getSession('webdriver-classic');
$session->visit($url);

$session->getPage()->findLink('Chat')->click();

Please refer to MinkExtension-example for an executable example.

Installation

composer require behat/mink mink/webdriver-classic-driver

Testing

  1. Start WebDriver
    1. If you have Docker installed, run
    docker run -p 4444:4444 selenium/standalone-firefox:4.18.1
    1. If you do not have Docker, but you have Java
    curl -L https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.18.0/selenium-server-4.18.1.jar > selenium-server-4.18.1.jar
    java -jar selenium-server-4.18.1.jar standalone
  2. Start WebServer by running
    ./vendor/bin/mink-test-server
  3. Start PhpUnit
    ./vendor/bin/phpunit -v --coverage-clover=coverage.clover