Skip to content

Instantly share code, notes, and snippets.

@bourg-ismael
Created November 3, 2014 15:56
Show Gist options
  • Save bourg-ismael/320293bf2dee81af65c9 to your computer and use it in GitHub Desktop.
Save bourg-ismael/320293bf2dee81af65c9 to your computer and use it in GitHub Desktop.
Selenium PHPUnit Test
<?php
class Example extends PHPUnit_Extensions_SeleniumTestCase
{
protected function setUp()
{
$this->setBrowser("*firefox");
$this->setBrowserUrl("http://192.168.33.120/");
}
public function testMyTestCase()
{
$this->open("/register");
$this->type("name=login", "gcrispyn@assessfirst.com");
$this->type("name=password", "toto");
$this->click("css=button.btn.btn-primary");
$this->waitForPageToLoad("30000");
$this->click("css=a.confirm");
$this->waitForPageToLoad("30000");
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment