标题: sessionId should not be null; has this session been started yet? [打印本页] 作者: yimaotao 时间: 2010-5-18 15:11 标题: sessionId should not be null; has this session been started yet? 我在debug一下代码的时候出现了错误:
public class sample extends SeleneseTestNgHelper{
Selenium selenium;
@Test public void testUntitled() throws Exception {
selenium=new DefaultSelenium("localhost", 4444, "*firefox", "http://www.swpu.edu.cn");
selenium.open("/");
selenium.click("link=软件学院第三届董事会第一次会议召开");
selenium.waitForPageToLoad("30000");
selenium.click("link=首页");
selenium.waitForPageToLoad("30000");
}
}
错误:
FAILED: testUntitled
com.thoughtworks.selenium.SeleniumException: ERROR Server Exception: sessionId should not be null; has this session been started yet?
at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91)
at com.thoughtworks.selenium.DefaultSelenium.open(DefaultSelenium.java:335)
at sample.testUntitled(sample.java:11)
... Removed 22 stack frames