我无法在 Protractor 中运行我的测试用例。 它打开chrome窗口,写入数据;在 URL 部分,但随后它崩溃了。 你知道我为什么会收到此错误吗?
Running "protractor:current" (protractor) task
Using the selenium server at http://localhost:4444/wd/hub
[launcher] Running 1 instances of WebDriver
Session created: count=1, browserName=chrome
Exception thrown: Keeping the Selenium server alive
C:\Users\210080088\Documents\Github\performance-central\app\src\main\resources\static\node_modules\grunt-protractor-runner\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\error.js:108
var template = new Error(this.message);
^
UnknownError: Connection reset
最佳答案
我发现您正在使用某种排序或任务运行程序,例如 gulp 或 grunt。
咕噜咕噜:
您可能正在使用https://github.com/mllrsohn/gulp-protractor
将此更新到版本 3.0.0 npm update gulp-protractor
然后使用此任务更新 webdrivers https://github.com/mllrsohn/gulp-protractor#protractor-webdriver
示例位于源代码的示例部分
咕噜声:
您可能正在使用https://github.com/teerapap/grunt-protractor-runner
将此更新到版本 4.0.0 npm update grunt-protractor-runner
https://github.com/teerapap/grunt-protractor-runner#optionswebdrivermanagerupdate
使用此选项在每次运行任务时更新您的网络驱动程序
关于selenium - Protractor 未知错误: Connection reset,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40406985/