我使用步骤来运行此链接上提供的 chrome 脚本,它显示错误我按照以下链接中建议的步骤安装了 chrome 驱动程序,但它不起作用
https://github.com/zeljkofilipin/watirbook/blob/master/installation/windows.md#chrome-with-watir-webdriver
我的电脑配置 Win 7 & 64bit
C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.9-x86-mingw32/lib/ffi/platform.rb:27
: Use RbConfig instead of obsolete and deprecated Config.
Started ChromeDriver
port=54035
version=20.0.1133.0
log=D:\chromedriver.log
=> #<Watir::Browser:0x3568d490 url="chrome://newtab/" title="New Tab">
irb(main):003:0> browser.goto "watir.com"
[0528/164700:ERROR:automation_proxy.cc(367)] Channel error in AutomationProxy.
Selenium::WebDriver::Error::UnknownError: Chrome did not respond to 'WaitForAllT
absToStopLoading'. Elapsed time was 1 ms.
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/response.rb:52:in `assert_ok'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/response.rb:15:in `initialize'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/http/common.rb:59:in `new'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/http/common.rb:59:in `create_response'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/http/default.rb:64:in `request'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/http/common.rb:40:in `call'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/bridge.rb:598:in `raw_execute'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/bridge.rb:576:in `execute'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/bridge.rb:155:in `getCurrentUrl'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/common/driver.rb:118:in `current_url'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.5.8/lib/watir
-webdriver/browser.rb:78:in `url'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.5.8/lib/watir
-webdriver/browser.rb:66:in `goto'
from (irb):3
from C:/Ruby193/bin/irb:12:in `<main>'
irb(main):004:0>
我将代码用作
>irb
> require "watir-webdriver"
=> true
> browser = Watir::Browser.new :chrome
Started ChromeDriver
port=49522
=> #<Watir::Browser:0x..fd
bf27548 url="about:blank"
title="about:blank">
> browser.goto "watir.com"