当我们从 Windows 迁移到 Linux 时,我们的 Nightwatch 测试不再运行。它只是卡住。
Selenium 服务器已在监听,并且 chrome_driver
(linux 64 位)设置已正确设置。然而,这就是我们得到的:
$ node nightwatch.js -t tests/mytest.js --verbose
[ mytestmodule ]
Running: MyTest
INFO Request: POST /wd/hub/session
- data: {"desiredCapabilities":{"browserName":"chrome","javascriptEnabled":true,"acceptSslCerts":true,"platform":"ANY"},"sessionId":null}
- headers: {"Content-Type":"application/json","Content-Length":129}
非常感谢任何建议。
最佳答案
如果使用旧版本的 selenium jar,我在 mac 上启动不同的网络驱动程序时会遇到一些问题。请检查您的 selenium 服务器版本是否是最新的。
第二个想法:用Firefox跑试试看,好像是现在selenium支持最多的浏览器。如果是,那么您可以将问题定位到 chrome/chrome 网络驱动程序。
如果没有,请发布您的整个 setting.json,也许还有一个测试片段...
关于javascript - NightwatchJS "freezes",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22193683/