ruby - after execute Watir::IE.new, no replay, change it to Watir::IE.new_process, ie can open,but got blank for ie.goto(address) -
i'm using ruby192 on win7 64bit,ie version 10, gem list like:
builder (3.2.0) childprocess (0.3.9) commonwatir (3.0.0) ffi (1.6.0 x86-mingw32) hoe (3.5.2) mini_magick (3.5.0) minitest (1.6.0) multi_json (1.7.2) nokogiri (1.5.9 x86-mingw32) rake (0.8.7) rautomation (0.8.0) rdoc (2.5.8) rubygems-update (2.0.3) rubyzip (0.9.9) s4t-utils (1.0.4) selenium-webdriver (2.31.0) subexec (0.2.2) user-choices (1.1.6.1) watir (3.0.0) watir-classic (3.6.0) watir-webdriver (0.6.2) websocket (1.0.7) win32-api (1.4.8 x86-mingw32) win32-process (0.6.6) win32screenshot (1.0.8) windows-api (0.4.2) windows-pr (1.2.2) xml-simple (1.1.2)
the code like:
require 'rubygems' require 'watir' ie=watir::ie.new ie.goto "www.google.com"
after executed, no response. after long time, got:
c:/ruby192/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-classic/ie class.rb:598:in 'sleep': execution expired (timeout::error) c:/ruby192/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-classic/ie-class.rb:598:in `block in wait' c:/ruby192/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-classic/ie-class.rb:591:in `wait' c:/ruby192/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-classic/ie-class.rb:349:in `goto' c:/ruby192/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-classic/ie-class.rb:542:in `_new_window_init' c:/ruby192/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-classic/ie-class.rb:236:in `initialize' c:/users/cc-yxl/desktop/yxl-work/rubyworkspace/bookmarks/openwebsite.rb:5:in `new' c:/users/cc-yxl/desktop/yxl-work/rubyworkspace/bookmarks/openwebsite.rb:5:in `<main>'
then tried change ie=watir::ie.new
ie=watir::ie.new_process
, , opened blank page.
i soved problem clicking restore internet explorer under internet options->advance. hope helpful others
Comments
Post a Comment