Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 32 lines (22 sloc) 957 Bytes
// Sample WebDriver code - search Google for "Selenium is awesome" and take
// a screenshot.
// You need three things to run this code:
// 1. A copy of chromedriver (from the Selenium downloads.)
// 2. The standalone Selenium server v2.0 running with
// 3. A copy of checked out.
require_once "..phpwebdriver/WebDriver.php";
$timestamp = time();
$browsers = array("chrome", "firefox");
foreach($browsers as $browser) {
$webdriver = new WebDriver("localhost", "4444");
$element = $webdriver->findElementBy(LocatorStrategy::name, "q");
$element->sendKeys(array("selenium is awesome"));