Driver to Sahi JS test automation tool.
-
First, install & configure Sahi as described here
-
After that, you could write/run initial script like this:
<?php require_once '/sahi/driver/path/autoload.php.dist'; use Behat\SahiClient\Client; $client = new Client(); $client->start('firefox'); ....
-
And now, you can work with
$browser
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();
SahiClient Copyright (c) 2011 Konstantin Kudryashov (ever.zet). See LICENSE for details.
- Konstantin Kudryashov everzet [lead developer]