Skip to content

Instantly share code, notes, and snippets.

@mrchrisadams
Created June 7, 2011 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrchrisadams/1012376 to your computer and use it in GitHub Desktop.
Save mrchrisadams/1012376 to your computer and use it in GitHub Desktop.
example selenium php script
<?php
// require_once 'PHPUnit/Framework/TestCase.php';
require_once 'PHPUnit/Autoload.php';
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
class TryingOutSelenium extends PHPUnit_Extensions_SeleniumTestCase
{
protected function setUp()
{
$this->setBrowser("*firefox");
$this->setBrowserUrl("http://perky.dev/");
}
public function testMyTestCase()
{
$this->open("/dashboard");
$this->click("//div[@id='block-atrium-create']/div[1]");
$this->click("link=Group");
$this->waitForPageToLoad("30000");
$this->type("edit-title", "The UK");
$this->type("edit-purl-value", "uk");
$this->type("edit-og-description", "good old blighty");
$this->click("edit-submit");
$this->waitForPageToLoad("30000");
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment