2012-12-04 53 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,我希望它为你的作品!