junit 运行时异常:无法启动Selenium会话:内部服务器错误

hfwmuf9z  于 2022-11-11  发布在  其他
关注(0)|答案(1)|浏览(87)

我正在尝试使用 selenium 检测空中碰撞问题(同时编辑)。
因此,我启动了一个 selenium 会话A,其中包含以下内容(超级类)

selenium = new MASSelenium(serverHost, serverPort, *iexplore, browserURL);
selenium.start();
selenium.open("index.cgi");

然后,我尝试启动一个不同的selenium会话B指向一个与超类(子类)不同的浏览器:

selenium2 = new MASSelenium(getServerHost(), getServerPort(), *firefox, getBrowserURL());
selenium2.start();
selenium2.open("index.cgi");

它在我的本地机器上运行得很好(表现符合预期),但是当我在远程机器上运行同样的测试(使用bamboo构建工具)时,我得到了这个异常:

java.lang.RuntimeException: Could not start Selenium session: Internal Server Error
    at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:89)
    at gov.baba.arc.mas.selenium.tests.SimultaneousEditingConflictDetected.setUp(SimultaneousEditingConflictDetected.java:78)
Caused by: com.thoughtworks.selenium.SeleniumException: Internal Server Error
    at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
    at com.thoughtworks.selenium.HttpCommandProcessor.getCommandResponseAsString(HttpCommandProcessor.java:168)
    at com.thoughtworks.selenium.HttpCommandProcessor.executeCommandOnServlet(HttpCommandProcessor.java:104)
    at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:86)

知道为什么会这样吗?

q0qdq0h2

q0qdq0h21#

我也遇到了同样的问题。我通过升级竹轮上的 selenium 本身(而不是驱动程序)来解决它

相关问题