The RC launches the firefox browser but it tries to open the following link "chrome://src/content/RemoteRunner.html?sessionId=94c0e90deec8470ab358718255d27575&multiWindow=true&baseUrl=https%3A%2F%2Fwww.facebook.com%2F&debugMode=false&driverUrl=http://localhost:4444/selenium-server/driver/"
instead of "https://www.facebook.com/"
import static org.junit.Assert.*;
import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.Selenium;
@SuppressWarnings("deprecation")
public class DemoClass {
private Selenium selenium;
@Before
public void setUp() throws Exception {
selenium = new DefaultSelenium("localhost", 4444, "*firefox C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe", "https://www.facebook.com/");
selenium.start();
}
@Test
public void Assignment1() throws Exception {
selenium.open("/");
assertTrue(selenium.isElementPresent("id=email"));
assertTrue(selenium.isElementPresent("id=pass"));
selenium.type("id=email", "devranipankaj163@gmail.com");
selenium.type("id=pass", "demo@123");
assertEquals("devranipankaj163@gmail.com", selenium.getValue("id=email"));
selenium.click("id=u_0_n");
selenium.waitForPageToLoad("30000");
}
@After
public void tearDown() throws Exception {
selenium.stop();
}
}