Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 21st, 2012  |  syntax: None  |  size: 0.54 KB  |  hits: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. require_once 'PHPUnit/Extensions/SeleniumTestCase.php';
  3. class MySeleniumTest extends PHPUnit_Extensions_SeleniumTestCase {
  4.  
  5.     protected function setUp() {
  6.         $this->setBrowser("*firefox");
  7.         $this->setBrowserUrl("http://example.com/");
  8.     }
  9.  
  10.     public function testMyTestCase() {
  11.         $this->open("/");
  12.         $this->click("//a[@href='/contact/']");
  13.     }
  14.  
  15. }
  16.  
  17. $test = new MySeleniumTest();
  18. //I want to run the test and get information about the results so I can store them in the database, send an email etc.
  19. ?>