2015-04-01 50 views
1

我有一個Selenium集線器,需要通過https進行身份驗證。用身份驗證將Selenium節點連接到集線器

網址:

https://xxxxxxxx.com:4444 

在我nodeConfig.json被設置如下:

... 
"hubHost":"https://username:[email protected]", 
"hubPort":4444, 
.... 

我也試着用下面的參數太多:

-jar "selenium-server-standalone-2.45.0.jar" -role node -hub "https://username:[email protected]:4444" 

當我嘗試將節點連接到集線器,控制檯中將出現以下行:

09:22:55.124 INFO - Registering the node to hub :http://https://username:[email protected]: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://但我不知道該如何解決。有人可以幫助我,如何通過身份驗證連接到集線器?

提前致謝!

回答

0

假設您已經手動嘗試了url https://username:[email protected]:4444並發現它正常工作;做下面的變化在nodeconfig.json

而不是

... 
"hubHost":"https://username:[email protected]", 
"hubPort":4444, 
.... 

... 
"hub":"https://username:[email protected]:4444/grid/register" 
.... 
+0

我認爲這個問題是與HTTPS。我檢查了源代碼,似乎硒網格只支持http。 (https://github.com/SeleniumHQ/selenium/tree/master/java/server/test/org/openqa/grid) 是否可以在不修改源代碼的情況下設置https? – peetya 2015-04-14 08:54:34

+0

當您給https:// username:[email protected]:4444/grid/console時,您能看到網格控制檯嗎? – 2015-04-16 03:57:40

+0

是的,我可以在瀏覽器中找到它。 – peetya 2015-04-16 11:18:35

相關問題