使用auth将Selenium节点连接到集线器

时间:2015-04-01 07:28:06

标签: selenium https selenium-grid

我有一个Selenium HUB,需要通过https进行身份验证。

网址:

https://xxxxxxxx.com:4444

在我的nodeConfig.json中设置如下:

...
"hubHost":"https://username:password@xxxxxxxx.com",
"hubPort":4444,
....

我也尝试使用以下参数:

-jar "selenium-server-standalone-2.45.0.jar" -role node -hub "https://username:password@xxxxxxxx.com:4444"

当我尝试将节点连接到集线器时,控制台中将显示以下行:

09:22:55.124 INFO - Registering the node to hub :http://https://username:password@xxxxxxxx.com:4444/grid/register
09:22:56.153 INFO - couldn't register this node : Error sending the registration request.
09:23:02.177 INFO - couldn't register this node : Hub is down or not responding: Connect to https:80 [https/127.0.1.2] failed: Connection refused: connect

我认为问题是http://https://,但我不知道如何解决它。有人可以帮助我,如何使用auth连接到集线器?

提前致谢!

1 个答案:

答案 0 :(得分:0)

假设您已经手动尝试了网址https://username:password@xxxxxxxx.com:4444并发现它正常工作;在nodeconfig.json中进行以下更改

而不是

...
"hubHost":"https://username:password@xxxxxxxx.com",
"hubPort":4444,
....

提供

...
"hub":"https://username:password@xxxxxxxx.com:4444/grid/register"
....