Selenium 2 Webdriver +网格2 +需要 Ruby 帮助
我一直在尝试各种版本的 Selenium,现在 Selenium 2 已经发布了,我决定深入研究 Webdriver 并将其与 Grid 一起使用。 (用 Ruby 进行测试)
我的问题是我似乎无法做到这一点。
在我的 Mac 上,我启动 Grid hub:
java -jar selenium-server-staalone-2.3.0.jar -role hub
在我的 Windows 7 上,我启动 Webdriver:
java -jar selenium-server-standalone-2.3.0.jar -role webdriver -hub http://192.168.10.52:4444/grid/register port 5555
然后我运行一个简单的 Ruby 测试,该测试仅远程打开 Internet Explorer 并继续运行 Google:
require "rubygems"
require "selenium-webdriver"
driver = Selenium::WebDriver.for(:remote, :desired_capabilities => :ie)
driver.get "http://google.co.uk"
driver.quit
这是运行者:
ruby wd_test.rb
这给了我很长的抱怨,我想这其中最重要的一点是:
[remote server] org.openqa.grid.internal.Registry(Registry.java):194:in `addNewSessionRequest': cannot find : {platform=WINDOWS, javascriptEnabled=false, cssSelectorsEnabled=true, browserName=internet explorer, nativeEvents=false, rotatable=false, takesScreenshot=true, version=} (org.openqa.grid.common.exception.CapabilityNotPresentOnTheGridException) (Selenium::WebDriver::Error::UnhandledError)
我一定错过了一些非常基本的东西。有人可以帮我吗?
提前致谢!
I been playing around with various versions of Selenium, now that Selenium 2 was out I decided to dive into Webdriver and use it with Grid. (tests in Ruby)
My problem is that I can't seem to make that work.
On my Mac I start the Grid hub:
java -jar selenium-server-staalone-2.3.0.jar -role hub
On my Windows 7 I start Webdriver:
java -jar selenium-server-standalone-2.3.0.jar -role webdriver -hub http://192.168.10.52:4444/grid/register port 5555
Then I run a simple Ruby test that just opens Internet Explorer remotely and goes on Google:
require "rubygems"
require "selenium-webdriver"
driver = Selenium::WebDriver.for(:remote, :desired_capabilities => :ie)
driver.get "http://google.co.uk"
driver.quit
This is run by:
ruby wd_test.rb
Which gives me a lengthy complaining, I guess this is the most important bit of it:
[remote server] org.openqa.grid.internal.Registry(Registry.java):194:in `addNewSessionRequest': cannot find : {platform=WINDOWS, javascriptEnabled=false, cssSelectorsEnabled=true, browserName=internet explorer, nativeEvents=false, rotatable=false, takesScreenshot=true, version=} (org.openqa.grid.common.exception.CapabilityNotPresentOnTheGridException) (Selenium::WebDriver::Error::UnhandledError)
I must be missing something very basic. Could someone give me a hand?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现问题是节点没有自动发现,这解决了它:
I have found the problem there is no auto discovery for nodes, this fixes it: