2012-12-04 89 views
5

我知道ghostdriver wiki上有關於如何將其附加到硒網格上的文檔。對於那些不知道你可以找到它here任何人都無法註冊與硒網格Ghostdriver?

我已經編譯了特殊phantomjs兩次,試圖將它附加到硒服務器本地,並遠程使用Selenium版本2.24和2.25無濟於事。它會像你期望的那樣在本地啓動Ghostdriver,但是當然不會進行註冊。

我試了ip/localhost:4444和ip/localhost:4444/grid/register沒有結果。我也想過,也許它只是沒有出現在網格控制檯上,並試圖對它進行測試,但沒有說明沒有填充網格。

我在CentOS 6和Ubuntu 12.04上都試過這個,沒有運氣。

我出來的想法。有沒有其他人有這樣的問題?

回答

6

我有完全相同的問題,並使用最新版本的硒網格修復它。

好網站:https://code.google.com/p/selenium/wiki/Grid2(這不再是http://selenium-grid.seleniumhq.org/)。

下面的步驟(2.31.0版本):

下載硒 - 服務器:

wget https://selenium.googlecode.com/files/selenium-server-standalone-2.31.0.jar

啓動硒網格服務器:

java -jar selenium-server-standalone-2.31.0.jar -role hub

在一個新的終端,推出GhostDriver :

phantomjs --webdriver=5555 --webdriver-selenium-grid-hub=http://localhost:4444

查看http://localhost:4444/grid/console上的可用遙控器。

您應該看到類似的東西:

listening on http://127.0.0.1:5555 
test session time out after 300 sec. 
Supports up to 1 concurrent tests from: 
phantomjs

我在測試這個命令在CentOS 6.3,我希望它爲你的作品!