本文介绍了在 chrome 上运行的脚本显示错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用了运行此链接上提供的 chrome 脚本的步骤,显示错误我按照以下链接中建议的步骤安装了 chrome 驱动程序,但它不起作用
I used steps to run chrome script provided on this links its showing errorI Installed chrome driver as steps suggested in below link but its not working
https://github.com/zeljkofilipin/watirbook/blob/master/installation/windows.md#chrome-with-watir-webdriver
我的 PC 配置 Win 7 &64位
My PC configuration 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"
推荐答案
感谢您提供详细信息以检查所有版本.我的版本-> 它向我展示了 3 个版本的 watir webdriver我卸载了旧版本现在它工作正常现在我的版本是 watir-webdriver (0.6.1)
Thanks for providing details to check all versions. My version-> Its showing me 3 versions of watir webdriverI uninstalled old versions now its working fineNow my version its watir-webdriver (0.6.1)
这篇关于在 chrome 上运行的脚本显示错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!