mink / webdriver-classic-driver
W3C WebDriver Classic driver for Mink framework
Installs: 6 071
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 6
Forks: 5
Open Issues: 11
Language:JavaScript
Type:mink-driver
Requires
- php: >=7.4
- ext-json: *
- behat/mink: ^1.11@dev
- php-webdriver/webdriver: ^1.14
Requires (Dev)
- jetbrains/phpstorm-attributes: ^1.0
- mink/driver-testsuite: dev-master
- phpstan/phpstan: ^1.10
- phpstan/phpstan-phpunit: ^1.3
- phpunit/phpunit: ^9.6.8
- symfony/error-handler: ^5.4 || ^6.0 || ^7.0
- symfony/process: ^5.4 || ^6.0 || ^7.0
This package is auto-updated.
Last update: 2024-11-21 21:34:10 UTC
README
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
- Start WebDriver
- If you have Docker installed, run
docker run -p 4444:4444 selenium/standalone-firefox:4.18.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
- Start WebServer by running
./vendor/bin/mink-test-server
- Start PhpUnit
./vendor/bin/phpunit -v --coverage-clover=coverage.clover