量角器独立硒失败:错误:等待 WebDriver 服务器超时 [英] protractor stand alone selenium fails: Error: Timed out waiting for the WebDriver server at
问题描述
我已经在独立的 selenium 服务器上安装了量角器:
I have installed protractor with the stand alone selenium server:
webdriver-manager update
如果我在独立服务器已经运行的情况下运行量角器,并且配置指向那个 selenium 实例,它工作正常.
If I run protractor with the stand alone server already running and the config pointed at that selenium instance it works fine.
我想让量角器启动服务器,然后运行测试.默认情况下,量角器会找到 chrome 驱动程序和 selenium 服务器 jar,所以我使用的是最小配置:
I want to have protractor start the server and then run the tests. By default protractor finds chrome driver and the selenium server jar so I am using a minimal config:
exports.config = {
capabilities: {
'browserName': 'chrome'
},
specs: ['test/e2e/*.js']
};
但是当它启动时无法连接到服务器.
But when it launches it can't connect to the server.
Error: Timed out waiting for the WebDriver server at http://192.168.1.146:56159/
wd/hub
我注意到当使用 webdriver-manager start 启动 seleniumn 时,服务器会在 localhost 上启动.我似乎无法让量角器做同样的事情.
I have noticed that when starting seleniumn with webdriver-manager start that the server starts up on localhost. I can't seem to get protractor to do the same.
我的猜测是防火墙阻止了连接.
My guess is that the firewall is preventing the connection.
环境版本信息:- 咕噜 v0.4.1
- 节点 0.10.18- selenium-server-standalone-2.37.0.jar- selenium-server-standalone-2.38.0.jar- 量角器 0.14.0- Windows 7 专业版
Environment Version info:
- grunt v0.4.1
- node 0.10.18
- selenium-server-standalone-2.37.0.jar
- selenium-server-standalone-2.38.0.jar
- protractor 0.14.0
- windows 7 Pro
推荐答案
将服务器添加到您的配置中:
Add the server to your config:
exports.config = {
// The address of a running selenium server.
seleniumAddress: 'http://localhost:4444/wd/hub',
capabilities ...
}
这篇关于量角器独立硒失败:错误:等待 WebDriver 服务器超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!