[Wtr-general] Problem with attach using ":title"

marekj marekj.com at gmail.com
Thu Jul 12 20:09:23 EDT 2007


Thanks Bret,
I can see now how I can run same set of tests at the same time and each IE
instance runs in different Thread process.

Just reading more here:
http://phrogz.net/ProgrammingRuby/tut_threads.html#threadsandprocesses
and
http://www.ruby-doc.org/core/classes/Thread.html
the most important
and " Any threads not joined will be killed when the main program exits."


On 7/3/07, Bret Pettichord <bret at pettichord.com > wrote:
>
> marekj wrote:
> >
> > hmmm... I was thinking that if I have 3 scripts running at the same
> > time with -b switch they would get confused at which window to talk to.
> Take a look at concurrent_search.rb:
>
> require 'thread'
> require 'watir'
>
> def test_google
>   ie = Watir::IE.start ('http://www.google.com' <http://www.google.com%27>
> )
>   ie.text_field(:name, "q").set("pickaxe")
>   ie.button(:value, "Google Search").click
>   ie.close
> end
>
> # run the same test three times concurrently in separate browsers
> threads = []
> 3.times do
>   threads << Thread.new {test_google}
> end
> threads.each {|x| x.join}
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070712/2ea61672/attachment.html 


More information about the Wtr-general mailing list