selenium-webdriver - 还有其他人在使用 Selenium Grid 注册 Ghostdriver 时遇到问题吗?

标签 selenium-webdriver phantomjs selenium-grid

我知道 ghostdriver wiki 上有关于如何将其附加到 Selenium 网格的文档。不知道的可以找here

我已经编译了两次特殊的 phantomjs,尝试将它连接到本地的 selenium 服务器,并使用 Selenium 2.24 和 2.25 版本进行远程连接,但无济于事。它就像您期望的那样在本地启动 Ghostdriver,但肯定不会进行注册。

我尝试了 ip/localhost:4444 和 ip/localhost:4444/grid/register 都没有结果。我还认为它可能只是没有出现在网格控制台上,无论如何都试图对其进行测试,但失败了,表明网格中没有任何内容。

我在 CentOS 6 和 Ubuntu 12.04 上都试过这个,但没有成功。

我没有想法了。有没有其他人遇到过这样的问题?

最佳答案

我遇到了完全相同的问题,并使用最新版本的 selenium-grid 修复了它。

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

这里的步骤(版本 2.31.0):

下载 Selenium 服务器:

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

启动 Selenium 网格服务器:

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

在新终端中,启动 GhostDriver:

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

查看可用的 Remote http://localhost:4444/grid/console .

你应该看到类似的东西:

听 http://127.0.0.1:5555
300 秒后测试 session 超时。
最多支持 1 个并发测试:
幻象

我在 CentOS 6.3 上测试这个命令,希望对你有用!

关于selenium-webdriver - 还有其他人在使用 Selenium Grid 注册 Ghostdriver 时遇到问题吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13713913/

相关文章:

java - 如何将 selenium webdriver 实例与 java 绑定(bind)并行化?

java - 使用并行用户和登录验证码进行自动化测试(使用 selenium webdriver)

Selenium HtmlUnitDriver 网页抓取从 EC2 服务器获得验证码页面

javascript - 如何使用 setAttribute 方法和 Python 中的 Selenium 更改 Datepicker 的隐藏元素的日期?

javascript - PhantomJS 中 evaulate 内部的属性未定义

node.js - 使用来自 casperjs 的 Node 模块

java - 转换为 Webdriver 后使用 Selenium Grid 时遇到问题

python - 如何在Python中使用selenium在不同WebDriver打开的不同chrome浏览器窗口之间切换?

java - 查找当年询问最多次数的标签名称并打印计数

node.js - 在 Heroku 上运行 Phantomjs + Node 时遇到问题