量角器独立硒失败:错误:等待WebDriver服务器超时 [英] protractor stand alone selenium fails: Error: Timed out waiting for the WebDriver server at

查看:18
本文介绍了量角器独立硒失败:错误:等待WebDriver服务器超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用独立的 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆