Hi,
I am trying to run the selenium webdriver testcase without starting
the selenium server. It should Ideally work. But I always get
connection refused error.
com.thoughtworks.selenium.SeleniumException: Connection refused:
connect
If i start my Server then it works fine. Is there any way to make my
selenium tests independent of my Server? (which was one of the reasons
i was planning to move to Webdriver. )
My testcode:
@Test
public void login_FF() throws Exception {
FirefoxDriver driver = new FirefoxDriver();
driver.get("
https://www.lebara-mobile.co.uk");
new WebDriverWait(driver, 15).until(new
ElementPresent(By.linkText("Sign up / Login")));
driver.findElement(By.linkText("Sign up / Login")).click();
new WebDriverWait(driver, 20).until(new
ElementPresent(By.id("loginID")));
driver.findElement(By.id("loginID")).sendKeys("
leb...@gmx.com");
new WebDriverWait(driver, 15).until(new
ElementPresent(By.id("loginID")));
driver.findElement(By.id("password")).sendKeys("lebara123");
new WebDriverWait(driver, 15).until(new
ElementPresent(By.xpath("//form[@id='login']/button")));
driver.findElement(By.xpath("//form[@id='login']/button")).click();
WebElement body = driver.findElement(By.tagName("body"));
//System.out.println(body.getText().contains("Activation
Complete!"));
System.out.println(body.getText());
}
Help appreciated.