使用watir-webdriver
运行以下ruby代码时收到“网关超时”错误。
require 'watir-webdriver'
browser = Watir::Browser.new :ff
错误说明:
服务器错误 - 此时无法访问服务器127.0.0.1。
请重试请求或联系您的管理员。
我有一种感觉,公司代理正在干扰Watir。也许Firefox正在尝试连接到在某些非标准端口上本地运行的Watir,并且代理干预并且无法解析地址127.0.0.1。这只是猜测。
任何人都有此错误的经验或有关watir-webdriver
工作的建议。有人在代理服务器后面成功运行watir-webdriver
吗?
这是堆栈跟踪的错误:
504网关超时
网关超时
服务器错误 - 服务器127.0.0.1是 此时无法访问。
(硒:: webdriver的::错误:: WebDriverError) C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/common.rb:66:在
请重试请求或联系 你的管理员trator。
create _response' C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/default.rb:66:in
reque st' C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/http/common.rb:40:在call' C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:640:in
raw_execut e' C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:101:在create_ses sion' C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/remote/bridge.rb:68:in
初始化“
C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/firefox/bridge.rb:36:在
initialize ' C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/common/driver.rb:31:in
新的” C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver/common/driver.rb:31:在for' C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.44.0/lib/selenium/webdriver.rb:67:in
关于” C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.11/lib/watir-webdriver/browser.rb:46:ininitialize' c:/dev/pxmapper/features/support/env.rb:11:in
new' c:/dev/pxmapper/features/support/env.rb:11:in<top (required)>' C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.18/lib/cucumber/rb_support/rb_language.rb:95:in
load' C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.18/lib/cucumber/rb_support/rb_language.rb:95:在load_code_file' C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.18/lib/cucumber/runtime/support_code.rb:180:in
LOAD_FILE” C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.18/lib/cucumber/runtime/support_code.rb:83:在block in load_files!' C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.18/lib/cucumber/runtime/support_code.rb:82:in
每个” C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.18/lib/cucumber/runtime/support_code.rb:82:在load_files!' C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.18/lib/cucumber/runtime.rb:184:in
load_step_definitions' C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.18/lib/cucumber/runtime.rb:42:在run!' C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.18/lib/cucumber/cli/main.rb:47:in
执行!” C:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.18/bin/cucumber:13:在<top (required)>' C:/Ruby193/bin/cucumber:23:in
负载” C:/ Ruby193 / bin / cucumber:23:在''