MinkSelenium2Driver

by minkphp

Selenium2 (webdriver) driver for Mink framework

431 Stars 147 Forks Last release: 8 months ago (v1.4.0) 372 Commits 13 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Mink Selenium2 (webdriver) Driver

Latest Stable Version Latest Unstable Version Total Downloads Build Status Scrutinizer Quality Score Code Coverage License

Usage Example

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 http://getcomposer.org/installer | php
$> php composer.phar install

Testing

  1. Start WebDriver
    1. If you have Docker installed, run
      bash
      docker run -p 4444:4444 selenium/standalone-firefox:2.53.1
      
    2. If you do not have Docker, but you have Java
      bash
      curl -L http://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
      
  2. Start WebServer by running
    bash
    ./vendor/bin/mink-test-server
    
  3. Start PhpUnit
    bash
    composer require --dev phpunit/phpunit
    ./vendor/bin/phpunit -v --coverage-clover=coverage.clover
    

Copyright

Copyright (c) 2012 Pete Otaqui [email protected].

Maintainers

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.