Script running on chrome showing errors

2019-05-18 16:31发布

I used steps to run chrome script provided on this links its showing error I 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

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>

I used the code as

 >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"

2条回答
不美不萌又怎样
2楼-- · 2019-05-18 17:14

if you have not already done so, try making sure that when you open a cmd window to start IRB or other watir scripts that you do so 'as administrator'. This can sometimes make a difference with Vista and Win7

查看更多
姐就是有狂的资本
3楼-- · 2019-05-18 17:22

Thanks for providing details to check all versions. My version-> Its showing me 3 versions of watir webdriver I uninstalled old versions now its working fine Now my version its watir-webdriver (0.6.1)

查看更多
登录 后发表回答