Skip to content
Selenium2 (webdriver) driver for Mink framework
PHP
Branch: master
Clone or download
oleg-andreyev and aik099 New Release (#311)
Updated CHANGELOG.md for 1.4.0 release
Latest commit 3ab9f31 Sep 2, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src New Release (#311) Sep 2, 2019
tests Merge pull request #296 from stof/fix_timeout_test Oct 3, 2018
.gitignore added test suite configuration May 29, 2012
.travis.yml Fixing build (#303) Aug 28, 2019
CHANGELOG.md New Release (#311) Sep 2, 2019
README.md New Release (#311) Sep 2, 2019
composer.json New Release (#311) Sep 2, 2019
phpunit.xml.dist Fixing build (#303) Aug 28, 2019

README.md

Mink Selenium2 (webdriver) Driver

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

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

Testing

  1. Start WebDriver
    1. If you have Docker installed, run
    docker run -p 4444:4444 selenium/standalone-firefox:2.53.1
    1. If you do not have Docker, but you have Java
    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
    ./vendor/bin/mink-test-server
  3. 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

You can’t perform that action at this time.