我有一个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连接到集线器吗?
提前感谢!
假设您已经尝试过urlhttps://username:password@xxxxxxxx.com:4444手动操作,发现它工作正常;在nodeconfig.json 中进行以下更改
代替
...
"hubHost":"https://username:password@xxxxxxxx.com",
"hubPort":4444,
....
提供
...
"hub":"https://username:password@xxxxxxxx.com:4444/grid/register"
....