我们有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
发布评论