Selenium IDE is a Firefox extension. Watch the video tutorial and download it
Note: the recorded test can be saved as HTML, Java, Python, Ruby, Perl and C#.
Selenium RC comes in two parts:
cd /etc/alternatives sudo rm java sudo ln -s /usr/lib/jvm/java-1.5.0-sun-1.5.0.11/jre/bin/java java
java -jar selenium-server.jar -interactive
package jj; import java.util.Random; import junit.framework.TestCase; import com.thoughtworks.selenium.DefaultSelenium; import com.thoughtworks.selenium.Selenium; public class EncountersRegistrationTest extends TestCase { // TODO *** update this variable to match your config *** private static final String LOCAL_LOGIN_URL = ""; private Selenium selenium; public void setUp() { selenium = new DefaultSelenium("localhost", 4444, "*firefox", LOCAL_LOGIN_URL); selenium.start(); } public void testParticipantRegistration() { selenium.open("/encounters23/login.html"); assertEquals("Login", selenium.getTitle()); selenium.type("code", "BC011234"); selenium.click("lang"); selenium.click("//input[@value='Submit']"); selenium.waitForPageToLoad("30000"); assertEquals("Registration 1 - Basic Information", selenium.getTitle()); Random random = new Random(); selenium.type("username", "test_" + random.nextInt(10000)); selenium.type("email", "toto@example.com"); selenium.select("province", "label=Nova Scotia"); selenium.click("//input[@value='Save And Continue']"); selenium.waitForPageToLoad("30000"); // preferences selenium.select("theme_5092", "label=11"); selenium.click("document.forms[0].terms[4]"); // checkbox selenium.click("//input[@value='Save And Continue']"); selenium.waitForPageToLoad("30000"); // school assertEquals("Registration 5 - School", selenium.getTitle()); selenium.select("school", "index=3"); selenium.click("//input[@value='Save And Continue']"); selenium.waitForPageToLoad("30000"); } public void tearDown() { selenium.stop(); } }