selenium - Protractor 未知错误: Connection reset

标签 selenium protractor selenium-chromedriver

我无法在 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/

相关文章:

java - 将鼠标悬停在菜单上并选择 java Selenium 中的子菜单

python - 使用 Selenium Python 客户端在不同浏览器中处理 headless (headless)模式

selenium - 位于 selenium 2.0 中检查 DOM 上元素是否存在的元素可见性的替代方案?

javascript - 如何使用 Protractor 从 Chrome 控制台获取所有日志?

azure - BrowserStack 和 Azure 集成和运行测试

java - 将 phantomjs 替换为 headless chromedriver 时出错

javascript - Selenium Nodejs CHROMEDRIVER 路径

selenium - 有没有办法处理 SSL 证书-使用 NUnit 在 Slenium 中的 Internet Explorer 和 Edge 中出现问题

eclipse - 我们如何在eclipse中使用 Protractor ?

javascript - Jasmine - 无法再通过 executeScript 滚动窗口