lullabot / mink-selenium2-driver
Selenium2 (WebDriver) driver for Mink framework
Installs: 1 681 168
Dependents: 6
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 163
Open Issues: 2
Language:JavaScript
Type:mink-driver
Requires
- php: >=8.1
- ext-json: *
- behat/mink: ^1.11@dev
- lullabot/php-webdriver: ^2.0.6
Requires (Dev)
- mink/driver-testsuite: dev-master
- phpstan/phpstan: ^1.10
- phpstan/phpstan-phpunit: ^1.3
- phpunit/phpunit: ^8.5.22 || ^9.5.11
- symfony/error-handler: ^4.4 || ^5.0 || ^6.0 || ^7.0
Replaces
- behat/mink-selenium2-driver: 1.7.0
README
Usage Example
<?php use Behat\Mink\Mink, Behat\Mink\Session, Behat\Mink\Driver\Selenium2Driver; use Selenium\Client as SeleniumClient; $browser = 'firefox'; $url = 'http://example.com'; $mink = new Mink(array( 'selenium2' => new Session(new Selenium2Driver($browser, null, $url)), )); $mink->getSession('selenium2')->getPage()->findLink('Chat')->click();
Please refer to MinkExtension-example for an executable example.
Installation
{ "require": { "behat/mink": "~1.5", "behat/mink-selenium2-driver": "~1.1" } }
$> curl -sS https://getcomposer.org/installer | php $> php composer.phar install
Testing
- Start WebDriver
- If you have Docker installed, run
docker run -p 4444:4444 selenium/standalone-firefox:2.53.1
- If you do not have Docker, but you have Java
curl -L https://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar > selenium-server-standalone-2.53.1.jar java -jar selenium-server-standalone-2.53.1.jar
- Start WebServer by running
./vendor/bin/mink-test-server
- Start PhpUnit
composer require --dev phpunit/phpunit ./vendor/bin/phpunit -v --coverage-clover=coverage.clover
Copyright
Copyright (c) 2012 Pete Otaqui pete@otaqui.com.
Maintainers
- Christophe Coevoet stof
- Pete Otaqui pete-otaqui
- Alexander Obuhovich aik099