我正在尝试在新机器上运行以下Ruby代码
require 'rubygems'
require 'capybara'
require 'capybara/dsl'
require "selenium-webdriver"
Capybara.run_server = false
Capybara.current_driver = :selenium
Capybara.app_host = 'http://www.google.com'
module MyCapybaraTest
class Test
include Capybara::DSL
def test_google
puts "starting..."
visit('/')
puts "done..."
end
end
end
t = MyCapybaraTest::Test.new
t.test_google
这给了我以下错误:
C:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.31.0/lib/selenium/webdriver /common/port_prober.rb:28:in `initialize': A socket operation encountered a dead network. - bind(2) (Errno::ENETDOWN)
任何人都知道如何解决这个问题?
由于
答案 0 :(得分:1)
您可能已经注意到此错误,因为系统检测到您的互联网已关闭。我看到你检查了你的防火墙,你使用不寻常的网络接口吗?你能用wireshark调试吗?