【发布时间】:2011-06-21 23:22:13
【问题描述】:
我已经在 cucumber 中设置了一个功能,并且正在使用 @javascript 标签让它在 selenium 中运行 在我的开发机器上,selenium 运行良好,但因为 webdriver 不支持 osx 上的本机事件,但我需要将它连接到运行 ubuntu 的虚拟机
我的 ubuntu 机器上运行了 webdriver 服务器
并像这样破解了我的水豚驱动程序,因此它像这样连接到远程服务器:
def browser
unless @browser
@browser = Selenium::WebDriver.for(:remote, :url => "http://192.168.1.69:4444/wd/hub",
:desired_capabilities => Selenium::WebDriver::Remote::Capabilities.firefox)
#@browser = Selenium::WebDriver.for(options.delete(:browser) || :firefox, options)
at_exit do
@browser.quit
end
end
@browser
end
当我运行我的测试时,我的虚拟机上的控制台显示正在发生的事情并输出:
WebDriver 远程服务器:INFO 正在执行 ....
但就是这样,由于超时,一段时间后测试失败
有什么想法吗?
【问题讨论】:
标签: macos ubuntu selenium cucumber capybara