Created
June 7, 2011 14:41
-
-
Save mrchrisadams/1012376 to your computer and use it in GitHub Desktop.
example selenium php script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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