SessionNotCreatedError:无法创建新服务:ChromeDriverService

编程入门 行业动态 更新时间:2024-10-28 04:26:10
本文介绍了SessionNotCreatedError:无法创建新服务:ChromeDriverService的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我们有AngularJS量角器测试。这个过程是按顺序设置和运行这些步骤:

We have AngularJS protractor tests. The process is to set up and run these steps in order:

$ npm install $ webdriver-manager update --ie32 --ignore_ssl $ gulp

我遇到的问题是此设置有效对于我的团队中的所有其他人,但我100%的时间收到此错误:

The problem I'm having is this setup works for everyone else on my team but 100% of the time I receive this error:

[11:42:33] I/local - Starting selenium standalone server... [11:42:36] I/local - Selenium standalone server started at 10.222.189.129:55574/wd/hub /path/to/repo/node_modules/selenium-webdriver/lib/error.js:27 super(opt_error); ^ SessionNotCreatedError: Unable to create new service: ChromeDriverService Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:54:15.039Z' System info: host: 'xxxx', ip: 'xxxx', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_131' Driver info: driver.version: unknown at WebDriverError (/path/to/repo/node_modules/selenium-webdriver/lib/error.js:27:5) at SessionNotCreatedError (/path/to/repo/node_modules/selenium-webdriver/lib/error.js:214:5) at Object.checkLegacyResponse (/path/to/repo/node_modules/selenium-webdriver/lib/error.js:505:15) at parseHttpResponse (/path/to/repo/node_modules/selenium-webdriver/lib/http.js:509:13) at doSend.then.response (/path/to/repo/node_modules/selenium-webdriver/lib/http.js:440:13) at process._tickCallback (internal/process/next_tick.js:103:7) From: Task: WebDriver.createSession() at Function.createSession (/path/to/repo/node_modules/selenium-webdriver/lib/webdriver.js:777:24) at Function.createSession (/path/to/repo/node_modules/selenium-webdriver/chrome.js:709:29)

这个问题与我的设置有关但我不知所措,所以投掷冰雹玛丽希望任何人有任何建议。

The problem is something to do with my setup but I'm at a loss, so throwing a Hail Mary on SO hoping anyone has any advice.

请让我知道您是否需要任何其他信息。先谢谢了,我浪费了很多时间去试试这个工作!

Please let me know if you need any additional info. Thank you in advance, I've wasted a lot of time trying to get this to work!

推荐答案

这可以通过修复更新到chromedriver和chrome的最新版本。

This can be fixed by updating to the latest version of both chromedriver and chrome.

如果您使用的是webdriver-manager,请运行

If you are using webdriver-manager, run

webdriver-manager update --chromedriver

然后从 www.google/chrome/browser/desktop/ ,并用最新版本替换旧版本。

Then download Chrome from www.google/chrome/browser/desktop/ and replace your old chrome with the latest version.

您还需要在运行webdriver的终端中运行 Ctrl-C

You will also need to Ctrl-C in the terminal where webdriver is running and run

webdriver-manager start

或者终止并重新启动Selenium守护进程过程捕捉最新的chromedriver。系统重启可能会有所帮助。

Or kill and restart the Selenium daemon process to capture the latest chromedriver. A system restart might be helpful.

同样值得一试:

Also worth trying:

npm update -g protractor webdriver-manager update

另见会话未在量角器中为镶边创建异常,以获取有关如何修改量角器配置中的Chromedriver版本

Also see session not created exception for chrome in Protractor for more details on how to modify the version of Chromedriver in protractor's config

最后,确保您的protractor.conf.js包含

Lastly, make sure that your protractor.conf.js has

commonCapabilities: { 'browserName': 'chrome', },

或者您应该使用

or else you should be using

--browser chrome

您的量角器命令中的标志

flag on your protractor command

更多推荐

SessionNotCreatedError:无法创建新服务:ChromeDriverService

本文发布于:2023-11-17 15:45:40,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:SessionNotCreatedError   ChromeDriverService

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!