开发者

selenium server problem

In eclipse i write one test case i am trying to run that case but its showing error This is my sample test case with junit:

public void setUp() throws Exception { seleniumServer = new Selenium开发者_如何学JAVAServer(); seleniumServer.start(); selenium.start(); }

public void testCase1() throws Exception {
    selenium.open("/jaidproj/home.jsp");
    selenium.click("//ul[@id='navigation']/li[2]/a/span[2]");
    selenium.waitForPageToLoad("30000");
    selenium.click("//div[@id='sidebar-a']/table/tbody/tr[1]/td/a[3]");
    selenium.waitForPageToLoad("30000");
    selenium.click("//ul[@id='navigation']/li[4]/a/span[2]");
    selenium.waitForPageToLoad("30000");
    selenium.click("//ul[@id='navigation']/li[5]/a/span[2]");
    selenium.waitForPageToLoad("30000");
    selenium.type("name", "dsagasg");
    selenium.type("email", "jaid.sk@gmail.com");
    selenium.type("contact", "342532235");
    selenium.type("comment", "sdfsagasgas");
    selenium.click("submit");
    selenium.waitForPageToLoad("30000");
}


public void tearDown() throws Exception {
    selenium.stop();
}

}

// i updated in java build path jar files also..

But at the run time its showing error:see the error below

*Failed to start: SocketListener0@0.0.0.0:4444* can any one help in this regard.

Thanks in adv.


Close the session of server once you finish executing testcases by typing the below line in browser

http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer


I think Your Mozilla firefox is not on path.Please set and you can successfully run your tests..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜