Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
/ SahiClient Public archive
forked from minkphp/SahiClient

Sahi testing framework client for php 5.3

License

Notifications You must be signed in to change notification settings

Behat/SahiClient

 
 

Repository files navigation

SahiClient

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

Driver to Sahi JS test automation tool.

Usage

  1. First, install & configure Sahi as described here

  2. Install SahiClient deps:

    curl -sS https://getcomposer.org/installer | php
    php composer.phar require behat/sahi-client '~1.1'
  3. 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');
  4. 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();
  5. After tests, turn browser off:

    <?php
    $client->stop();

Contributors

  • Konstantin Kudryashov everzet [lead developer]

About

Sahi testing framework client for php 5.3

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%