0
votes

I'm using ruby192 on win7 64bit,IE version is 10, the gem list is 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 is like:

require 'rubygems'
require 'watir'
ie=Watir::IE.new
ie.goto "www.google.com"

After it executed, no response. After a very long time, I 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)
    from 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'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-classic/ie-class.rb:591:in `wait'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-classic/ie-class.rb:349:in `goto'
    from 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'
    from C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-classic-3.6.0/lib/watir-classic/ie-class.rb:236:in `initialize'
    from C:/Users/CC-YXL/Desktop/yxl-work/RubyWorkSpace/BookMarks/openWebSite.rb:5:in `new'
    from C:/Users/CC-YXL/Desktop/yxl-work/RubyWorkSpace/BookMarks/openWebSite.rb:5:in `<main>'

Then I tried to change ie=Watir::IE.new to ie=Watir::IE.new_process, and I opened with a blank page.

1
I'm not sure about Ruby 1.9.2, but can you try with 1.9.3 or 2.0.0 and also use Watir::Browser.new.Jarmo Pertman

1 Answers

0
votes

I Soved this problem by clicking restore Internet Explorer under Internet Options->Advance. hope it will be helpful to others