PK ]5CV9p p phpunit.xml.distnu W+A
tests
vendor/behat/mink/driver-testsuite/tests
./src/Behat/Mink/Driver
PK ]5CV[m| .travis.ymlnu W+A language: php
php: [5.3, 5.4, 5.5, 5.6, hhvm]
env:
- WEBDRIVER=selenium
matrix:
allow_failures:
- env: 'WEBDRIVER=phantomjs'
fast_finish: true
include:
- php: 5.5
env: WEBDRIVER=phantomjs
before_script:
- export WEB_FIXTURES_HOST=http://localhost
- export WEB_FIXTURES_BROWSER=firefox
- sh bin/run-"$WEBDRIVER".sh
- composer install --prefer-source
- sudo apt-get update > /dev/null
- sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 > /dev/null
- sudo sed -i -e "s,/var/www,$(pwd)/vendor/behat/mink/driver-testsuite/web-fixtures,g" /etc/apache2/sites-available/default
- sudo /etc/init.d/apache2 restart
script: phpunit -v --coverage-clover=coverage.clover
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
after_failure:
- cat /tmp/webdriver_output.txt
PK ]5CVʼE E bin/run-selenium.shnu W+A #!/usr/bin/env sh
set -e
echo ' Starting XVFB'
sh -e /etc/init.d/xvfb start
export DISPLAY=:99.0
sleep 4
echo ' Downloading selenium'
curl -L http://selenium-release.storage.googleapis.com/2.43/selenium-server-standalone-2.43.1.jar > selenium.jar
echo ' Running selenium'
java -jar selenium.jar > /dev/null 2>&1 &
PK ]5CV<#3ׄ bin/run-phantomjs.shnu W+A #!/usr/bin/env sh
set -e
phantomjs --version
echo ' Running PhantomJS'
phantomjs --webdriver=4444 > /tmp/webdriver_output.txt &
PK ]5CVz z
composer.jsonnu W+A {
"name": "behat/mink-selenium2-driver",
"description": "Selenium2 (WebDriver) driver for Mink framework",
"keywords": ["selenium", "webdriver", "javascript", "ajax", "testing", "browser"],
"homepage": "http://mink.behat.org/",
"type": "mink-driver",
"license": "MIT",
"authors": [
{
"name": "Pete Otaqui",
"email": "pete@otaqui.com",
"homepage": "https://github.com/pete-otaqui"
},
{
"name": "Konstantin Kudryashov",
"email": "ever.zet@gmail.com",
"homepage": "http://everzet.com"
}
],
"require": {
"php": ">=5.3.1",
"behat/mink": "~1.6@dev",
"instaclick/php-webdriver": "~1.1"
},
"autoload": {
"psr-0": {
"Behat\\Mink\\Driver": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Behat\\Mink\\Tests\\Driver\\": "tests"
}
},
"extra": {
"branch-alias": {
"dev-master": "1.2.x-dev"
}
}
}
PK ]5CVf9n n CHANGELOG.mdnu W+A 1.2.0 / 2014-09-29
==================
BC break:
* Changed the behavior of `getValue` for checkboxes according to the BC break in Mink 1.6
New features:
* Added the support of the `chromeOptions` argument in capabilities
* Added the support of select elements in `setValue`
* Added the support of checbox and radio elements in `setValue`
* Added the support of HTML5 input types in `setValue` (for those supported by WebDriver itself)
* Added `getWebDriverSessionId` to get the WebDriver session id
* Added a way to configure the webdriver timeouts
* Implemented `getOuterHtml`
* Implemented `getWindowNames` and `getWindowName`
* Implemented `maximizeWindow`
* Implemented `submitForm`
* Implemented `isSelected`
Bug fixes:
* Fixed the selection of options for radio groups
* Fixed `getValue` for radio groups
* Fixed the selection of options for multiple selects to ensure the change event is triggered only once
* Fixed mouse interactions to use the webDriver API rather than using JS and emulating events
* Fixed duplicate change events being triggered when setting the value
* Fixed the code to throw exceptions for invalid usages of the driver
* Fixed the implementation of `mouseOver`
* Fixed `evaluateScript` and `executeScript` to support all syntaxes required by the Mink API
* Fixed the retrieval of HTML attributes in `getAttribute`
* Fixed form interactions to use the webDriver API rather than using JS and emulating change events
* Fixed the clearing of the value when the caret is at the beginning of the field in `setValue`
Testing:
* Updated the testsuite to use the new Mink 1.6 driver testsuite
* Added testing on HHVM
PK ]5CVzZT T tests/Selenium2Config.phpnu W+A skipPhantomJs($testCase, $test)) {
return $message;
}
if (
'phantomjs' !== getenv('WEBDRIVER')
&& 'Behat\Mink\Tests\Driver\Form\Html5Test' === $testCase
&& 'testHtml5Types' === $test
) {
return 'WebDriver does not support setting value in color inputs. See https://code.google.com/p/selenium/issues/detail?id=7650';
}
if (
'Behat\Mink\Tests\Driver\Js\WindowTest' === $testCase
&& 'testWindowMaximize' === $test
&& 'true' === getenv('TRAVIS')
) {
return 'Maximizing the window does not work when running the browser in Xvfb.';
}
return parent::skipMessage($testCase, $test);
}
/**
* {@inheritdoc}
*/
protected function supportsCss()
{
return true;
}
private function skipPhantomJs($testCase, $test)
{
if (
'Behat\Mink\Tests\Driver\Js\WindowTest' === $testCase
&& in_array($test, array('testResizeWindow', 'testWindowMaximize'))
) {
return 'PhantomJS is headless so resizing the window does not make sense.';
}
if (
'Behat\Mink\Tests\Driver\Basic\CookieTest' === $testCase
&& 'testHttpOnlyCookieIsDeleted' === $test
) {
return 'This test does not work for PhantomJS. See https://github.com/detro/ghostdriver/issues/170';
}
return null;
}
}
PK ]5CV[ tests/Custom/WindowNameTest.phpnu W+A getSession();
$windowNames = $session->getWindowNames();
$this->assertArrayHasKey(0, $windowNames);
foreach ($windowNames as $name) {
$this->assertRegExp(self::WINDOW_NAME_REGEXP, $name);
}
}
public function testGetWindowName()
{
$session = $this->getSession();
$this->assertRegExp(self::WINDOW_NAME_REGEXP, $session->getWindowName());
}
}
PK ]5CV7FJ3 3 tests/Custom/WebDriverTest.phpnu W+A getSession()->getDriver();
$this->assertNotEmpty($driver->getWebDriverSessionId(), 'Started session has an ID');
$driver = new Selenium2Driver();
$this->assertNull($driver->getWebDriverSessionId(), 'Not started session don\'t have an ID');
}
}
PK ]5CV_8 tests/Custom/TimeoutTest.phpnu W+A getSession()->getDriver()->setTimeouts(array('invalid'=>0));
}
public function testShortTimeoutDoesNotWaitForElementToAppear()
{
$this->getSession()->getDriver()->setTimeouts(array('implicit'=>0));
$this->getSession()->visit($this->pathTo('/js_test.html'));
$this->getSession()->getPage()->findById('waitable')->click();
$element = $this->getSession()->getPage()->find('css', '#waitable > div');
$this->assertNull($element);
}
public function testLongTimeoutWaitsForElementToAppear()
{
$this->getSession()->getDriver()->setTimeouts(array('implicit'=>5000));
$this->getSession()->visit($this->pathTo('/js_test.html'));
$this->getSession()->getPage()->findById('waitable')->click();
$element = $this->getSession()->getPage()->find('css', '#waitable > div');
$this->assertNotNull($element);
}
}
PK ]5CVJ/ /
.gitignorenu W+A vendor
composer.phar
composer.lock
phpunit.xml
PK ]5CV= = README.mdnu W+A Mink Selenium2 (webdriver) Driver
=================================
[![Latest Stable Version](https://poser.pugx.org/behat/mink-selenium2-driver/v/stable.svg)](https://packagist.org/packages/behat/mink-selenium2-driver)
[![Latest Unstable Version](https://poser.pugx.org/behat/mink-selenium2-driver/v/unstable.svg)](https://packagist.org/packages/behat/mink-selenium2-driver)
[![Total Downloads](https://poser.pugx.org/behat/mink-selenium2-driver/downloads.svg)](https://packagist.org/packages/behat/mink-selenium2-driver)
[![Build Status](https://travis-ci.org/Behat/MinkSelenium2Driver.svg?branch=master)](https://travis-ci.org/Behat/MinkSelenium2Driver)
[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/Behat/MinkSelenium2Driver/badges/quality-score.png?s=04d83b1e7471d2f60174b5ed17cd9dd3c9a0bc30)](https://scrutinizer-ci.com/g/Behat/MinkSelenium2Driver/)
[![Code Coverage](https://scrutinizer-ci.com/g/Behat/MinkSelenium2Driver/badges/coverage.png?s=abcab4bac44eed7d6e50879b7746e3d3d78e5d6c)](https://scrutinizer-ci.com/g/Behat/MinkSelenium2Driver/)
[![License](https://poser.pugx.org/behat/mink-selenium2-driver/license.svg)](https://packagist.org/packages/behat/mink-selenium2-driver)
Usage Example
-------------
``` php
new Session(new Selenium2Driver($browser, null, $url)),
));
$mink->getSession('selenium2')->getPage()->findLink('Chat')->click();
```
Please refer to [MinkExtension-example](https://github.com/Behat/MinkExtension-example) for an executable example.
Installation
------------
``` json
{
"require": {
"behat/mink": "~1.5",
"behat/mink-selenium2-driver": "~1.1"
}
}
```
``` bash
$> curl -sS http://getcomposer.org/installer | php
$> php composer.phar install
```
Copyright
---------
Copyright (c) 2012 Pete Otaqui .
Maintainers
-----------
* Pete Otaqui [pete-otaqui](http://github.com/pete-otaqui)
PK ]5CVvt t &