behat / sahi-client
Sahi.js client for PHP 5.3
Installs: 769 662
Dependents: 7
Suggesters: 0
Security: 0
Stars: 33
Watchers: 6
Forks: 6
Open Issues: 1
Requires
- php: >=5.3.1
- kriswallsmith/buzz: ~0.7
Requires (Dev)
- symfony/phpunit-bridge: ~2.7
README
Driver to Sahi JS test automation tool.
Usage
-
First, install & configure Sahi as described here
-
Install
SahiClient
deps:curl -sS https://getcomposer.org/installer | php php composer.phar require behat/sahi-client '~1.1'
-
After that, you could write/run initial script like this:
<?php require_once 'vendor/.composer/autoload.php'; use Behat\SahiClient\Client; $client = new Client(); $client->start('firefox');
-
And now, you can work with
$client
object as with Sahi remote controll:<?php $client->navigateTo('http://some_page.loc'); $link = $client->findLink('Search!'); $previousLinkText = $link->getText(); $link->click(); $h1Text = $client->findHeader(2)->getText();
-
After tests, turn browser off:
<?php $client->stop();
Contributors
- Konstantin Kudryashov everzet [lead developer]