[Wtr-general] goto statment problem under thread (win32 ruby and watir)

Bret Pettichord bret at pettichord.com
Tue Oct 17 17:56:31 EDT 2006


Park, Chong SuhX wrote:
>
> Does anyone know have any idea on go around problem from running into 
> blocking condition with “goto” statement under thread something like 
> below?
>
Your problem is that the ruby process exits before the thread completes. 
You need to call Thread#join to prevent this:

require 'watir'
include Watir
Thread.new {
puts "Hello"
ie = IE.new
ie.goto("http://google.com")
ie.close
puts "Life is wonderful thing"
}.join


More information about the Wtr-general mailing list