Watir not working as expected - Selenium::WebDriver::Error::UnknownError

Watir not working as expected - Selenium::WebDriver::Error::UnknownError

我安装了 Watir 并尝试了该网站中给出的一个简单示例。

require 'watir'
browser = Watir::Browser.new :chrome
browser.goto 'https://www.google.com'
browser.text_field(title: 'Search').set 'Hello World!'
browser.button(type: 'submit').click
browser.quit

当我 运行 Ruby 程序时,出现如下错误。

C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib/selenium/web driver/remote/response.rb:69:in 'assert_ok': unknown error: Runtime.executionCon textCreated has invalid 'context': {"auxData":{"frameId":"1352.1","isDefault":tr ue},"id":1,"name":"","origin":"://"} (Selenium::WebDriver::Error::UnknownError) (Session info: chrome=59.0.3071.115) (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.1 SP1 x86_64) from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib /selenium/webdriver/remote/response.rb:32:in 'initialize' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib /selenium/webdriver/remote/http/common.rb:83:in 'new' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib /selenium/webdriver/remote/http/common.rb:83:in 'create_response' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib /selenium/webdriver/remote/http/default.rb:107:in 'request' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib /selenium/webdriver/remote/http/common.rb:61:in 'call' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib /selenium/webdriver/remote/bridge.rb:170:in 'execute' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib /selenium/webdriver/remote/oss/bridge.rb:579:in 'execute' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib /selenium/webdriver/remote/oss/bridge.rb:52:in 'get' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/selenium-webdriver-3.4.3/lib /selenium/webdriver/common/navigation.rb:32:in 'to' from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/watir-6.3.0/lib/watir/browse r.rb:78:in 'goto'from example.rb:3:in ''

我 运行宁 windows 7.

你 运行 chromedriver=2.9.248315 反对 chrome v59。升级到 chromedriver 2.30,支持 chrome v58-60.