对于Firefox版本,Nightwatch.js'从selenium服务器检索新会话时出错

时间:2016-07-13 20:58:52

标签: selenium nightwatch.js

我已经遇到了这个问题,并且很难解决这个问题似乎值得在这里添加:

[My Test 0001] Test Suite
==================================

Running:  Load MY Auto Login page test

Error retrieving a new session from the selenium server
{ state: 'unhandled error',
  sessionId: null,
  hCode: 884712219,
  value: 
   { suppressed: [ [length]: 0 ],
     screen: null,
     cause: null,
     hCode: 1045402875,
     class: 'org.openqa.selenium.firefox.NotConnectedException',
     localizedMessage: 'Unable to connect to host localhost on port 7055 after 45000 ms. 

Firefox(或Safari)打开,然后不执行任何操作或交替崩溃。

希望这有助于其他人!

1 个答案:

答案 0 :(得分:1)

这是我如何修复它: 转到我的nightwatch.json文件并打开它。

查找

"selenium": {
    "start_process": true,
    "server_path": "./node_modules/[...]

导航到该路径并找出您拥有的selenium-standalone-server jar的版本。 (这可能不是最新的)。

将最新的selenium-standalone-server jar下载到该位置:http://www.seleniumhq.org/download/并点击链接

然后更新路径以获得jar的新版本号。

相关问题