I am a new user of webdriver. I already have the regression test
framework using selenium 1.0.3.
Now we are plannning to upgrade the present framework to selenium
webdriver. while trying to run the RC script on Webdriver, I am
getting the following failure trace:
java.lang.RuntimeException: Could not contact Selenium Server; have
you started it on 'localhost:4444' ?
Read more at
http://seleniumhq.org/projects/remote-control/not-started.html
Connection refused: connect
at
com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:
87)
at
com.thoughtworks.selenium.SeleneseTestBase.setUp(SeleneseTestBase.java:
132)
at
com.thoughtworks.selenium.SeleneseTestBase.setUp(SeleneseTestBase.java:
99)
at
com.thoughtworks.selenium.SeleneseTestCase.setUp(SeleneseTestCase.java:
80)
at testdriver.testRC.setUp(testRC.java:16)
at junit.framework.TestCase.runBare(TestCase.java:132)
at
com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:
228)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
Please let me know what all changes required in the below RC script to
run on the Web driver without running the selenium server.
/*Selenium RC Script start*/
package testdriver;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import com.thoughtworks.selenium.*;
public class testRC extends SeleneseTestCase {
// We create our Selenium test case
public void setUp() throws Exception {
setUp("
http://www.google.com/", "*firefox");
// We instantiate and start the browser
}
public void testNew() throws Exception {
selenium.open("/");
selenium.type("q", "selenium rc");
selenium.click("btnG");
selenium.waitForPageToLoad("10000");
assertTrue(selenium.isTextPresent("Google"));
}
}