Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A work in progress webdriver binding for php which will conform to the Json Wire Protocol

branch: nostatic

Fetching latest commit…

Cannot retrieve the latest commit at this time

readme.md

Instructions:

  1. The below example loads up www.shutterstock.com waits 2 seconds then shows two methods of clicking on a submit button. Comment one of them to test the other.see tests/ for more examples.
  2. You need to have cURL enabled in your php.ini.
<?php

require("../lib/BoostBase.php");

//Arg is optional for constructor. Arg is Remote WD instance
$session = new Boost(); 

//Args are capabilities for WD but Will choose defaults [Browser : Firefox]
$session->start();

//must contains HTTP protocol. 
$session->set_url("http://www.shutterstock.com"); 

//adding wait statement in following release
sleep(2);

//get and set and element object to $element;
$element = $session->get_element("id","index_keyword_submit" );
//click on the $element
$session->click($element);

//Another way to click on an element;
//this fetches the $element within the click method and clicks it directly.
$session->click("id", "index_keyword_submit");

sleep(3);

$session->kill();

?>

Note:

  1. For reporting options you can use PHPUnit or Behat(recommended)

TODO:

  1. complete JWP command list integration
  2. improve code
  3. improve klogger integration for logging test requests to webdriver in realtime. Uses flatfile for now.

License

BoostWebDriver by Luis Lopez is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

Something went wrong with that request. Please try again.