I am newer for the ruby and watir learner. I meet a problem when use
the thread.

code is :

# encoding: utf-8
require "watir"
require 'watir/ie'


ie = Watir::IE.new
  a = Thread.new {
  sleep 5
  ie.goto("file:///D:/gaxu/Desktop/188/zhifu/1882.htm")
  }
  puts "start"

  a.join

The running result is :

ruby new.rb
d:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-2.0.2/lib/watir/ie-class.rb:
390:in `method_missing': unknown property or method:
`navigate' (NoMethodError)
    HRESULT error code:0x8001010e
      The application called an interface that was marshalled for a
different thread.
        from d:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-2.0.2/lib/watir/ie-
class.rb:390:in `goto'
        from new.rb:9:in `block in <main>'
        from d:/Ruby192/lib/ruby/1.9.1/win32ole.rb:13:in `call'
        from d:/Ruby192/lib/ruby/1.9.1/win32ole.rb:13:in `block in
initialize'
start
>Exit code: 1

my ruby version is : ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

Can someone help me ?  what am I wrong ?

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

Reply via email to