硒+;PHPUnit:sessionId不应为null;这个会议已经开始了吗?

硒+;PHPUnit:sessionId不应为null;这个会议已经开始了吗?,session,selenium-webdriver,null,phpunit,testcomplete,Session,Selenium Webdriver,Null,Phpunit,Testcomplete,我正在用PHP运行Selenium RC。 我运行了一个简单的登录测试,该测试已成功完成,但就在关闭浏览器之前,出现以下错误: 23:50:09.969信息-命令请求:会话上的testComplete[,] D7a1effebabc24b0b9b46ad6fdb3eebec 23:50:09.969信息-扼杀谷歌 铬。。。23:50:10.286信息-获取结果:会话中的OK d7a1effeabc24b0b9b46ad6fdb3eebec 23:50:10.349信息-命令请求: 会话null上

我正在用PHP运行Selenium RC。 我运行了一个简单的登录测试,该测试已成功完成,但就在关闭浏览器之前,出现以下错误:

23:50:09.969信息-命令请求:会话上的testComplete[,] D7a1effebabc24b0b9b46ad6fdb3eebec 23:50:09.969信息-扼杀谷歌 铬。。。23:50:10.286信息-获取结果:会话中的OK d7a1effeabc24b0b9b46ad6fdb3eebec 23:50:10.349信息-命令请求: 会话null上的getLocation[,]23:50:10.351错误-运行异常 会话null java.lang.NullPointerException上的“getLocation”命令: sessionId不应为null;这个会议已经开始了吗? 位于org.openqa.selenium.server.FrameGroupCommandQueueSet.getQueueSet(FrameGroupCommandQueueSet.java:216) 位于org.openqa.selenium.server.commands.seleniumcorecordCommand.execute(seleniumcorecordCommand.java:34) 位于org.openqa.selenium.server.SeleniumDriverResourceHandler.docomand(SeleniumDriverResourceHandler.java:562) 位于org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:370) 位于org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:129) 位于org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530) 位于org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482) 位于org.openqa.jetty.http.HttpServer.service(HttpServer.java:909) 位于org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820) 位于org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986) 位于org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837) 位于org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:245) 位于org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:357) 位于org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:534) 23:50:10.364信息-获取结果:错误服务器异常:sessionId 不应为空;这个会议已经开始了吗?在会话上为空

我找不到解决办法。。。
请帮助。

问题在于
拆卸()中的
停止()
调用。删除它解决了问题。

设置()中添加这些行有助于:

$this->start();
sleep(1);

看起来你在getLocation()之前就杀了Google Chrome。请确保getLocation()调用在testComplete()之前完成。谢谢。似乎在tearDown中添加stop()会导致它失败。@yonran-你应该把它作为一个答案@希米克斯,你应该接受他的回答。@casperOne对我来说,这里的第二条评论说问题已经解决了。至少我不知道该怎么回答,因为op说他可以阻止它失败:/