Selenium17. Platform and Browser Compatibility: Windows: Internet Explorer 6.0 and 7.0 Firefox 0.8 to 2.0 Mozilla Suite 1.6+, 1.7+ Seamonkey 1.0 Opera 8 & 9 Mac OS X: Safari 2.0.4+ Firefox 0.8 to 2.0 Camino 1.0a1 Mozilla Suite 1.6+, 1.7+ Seamonkey 1.0 Not yet supported: OmniWeb Selenium Core.. © Copyright 2008, Gateway Group of companies. 18. Linux: Firefox 0.8 to 2.0 Mozilla Suite 1.6+, 1.7+ Konqueror Opera 8 & 9 Selenium Core.. © Copyright 2008, Gateway Group of companies. 23. Run All Tests Run Selected Test Pause/Play Execution Step through Execution Control Speed of Execution Highlight Elements in the Execution View the DOM of the current Page being tested Summary of the Test View the log of the current execution 26. The root of web application you want to test The list of actions in the actual test case to execute The log of the events that were executed, including any errors or warning that have occurred 27. Execution Commands Try the test in the Web based TestRunner Reference of the currently selected command Record test actions Specify commands, including asserts 37. (+) Java (JUnit) import com.thoughtworks.selenium.*; import junit.framework.*; public class ChagallTest extends TestCase { private Selenium browser; public void setUp() { browser = new DefaultSelenium("localhost", 4444, "*firefox", "http://10.0.1.106/chagallhotel/"); browser.start(); } public void testGoogle() { browser.open("http://10.0.1.106/chagallhotel/admin"); browser.type("q", "ld"); browser.click("btnG"); browser.waitForPageToLoad("5000"); assertEquals(" ", browser.getTitle()); } public void tearDown() { browser.stop(); } } Programming a Selenium RC Test © Copyright 2008, Gateway Group of companies. 38. (+) C# (NUnit) using Selenium; using Nunit.Framework; namespace MyTests { [TestFixture] public class ChagallTest { private ISelenium browser public void SetUp() { browser = new DefaultSelenium("localhost", 4444,"*firefox","http://http://10.0.1.106/chagallhotel/"); browser.Start(); } public void testChagall() { browser.Open("http://10.0.1.106/chagallhotel/"); browser.Type("q", "ld"); browser.Click("btnG"); browser.WaitForPageToLoad("5000"); Assert.AreEqual(" ", browser.GetTitle()); } public void TearDown() { browser.Stop(); } } } Programming a Selenium RC Test © Copyright 2008, Gateway Group of companies. 39. (+) PHP (PHPUnit) require_once 'Testing/Selenium.php'; require_once 'PHPUnit/Framework/TestCase.php'; class ChagallTest extends PHPUnit_Framework_TestCase { private $browser; public function setUp() { $this->browser = new Testing_Selenium("*firefox", "http://http://10.0.1.106/chagallhotel/"); $this->browser->start(); } public function tearDown() {$this->browser->stop();} public function testChagall() { $this->browser->open("/webhp?hl=en"); $this->browser->type("q", "ld"); $this->browser->click("btnG"); $this->browser->waitForPageToLoad(10000); $this->assertRegExp(" ", $this->browser->getTitle()); } } Programming a Selenium RC Test © Copyright 2008, Gateway Group of companies.