【发布时间】:2014-06-15 06:04:24
【问题描述】:
我有一个测试用例,其中有 3 个方法
Class
{
Method1();
Method2();
Method3()
}
现在,我想在 IE 中运行 Method1(),在 FF 中运行 Method2(),在 Chrome 中运行 Method3()。我已经编写了代码,它工作得很好。唯一的问题是它在控制台中出现错误“org.openqa.selenium.remote.SessionNotFoundException: Session ID is null. Using WebDriver after call quit()?”
Method1() 完成后,我退出驱动程序
driver.quit();
driver=null;
driver = new FirefoxDriver();
在 Method2() 完成后,Chrome 也是如此。
有人可以指导我为什么收到此消息以及解决方案是什么?
我不想使用 Selenium 网格。谢谢
【问题讨论】:
-
如果下面@lost 的建议不起作用,您需要发布更多“不起作用”的内容。看到这个:stackoverflow.com/help/mcve
-
在这里不工作意味着得到同样的错误“org.openqa.selenium.remote.SessionNotFoundException: Session ID is null. Using WebDriver after call quit()?”