Thanks Bret, <br>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.<br><br>Just reading more here: <br><a href="http://phrogz.net/ProgrammingRuby/tut_threads.html#threadsandprocesses" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://phrogz.net/ProgrammingRuby/tut_threads.html#threadsandprocesses</a><br>and <br><a href="http://www.ruby-doc.org/core/classes/Thread.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.ruby-doc.org/core/classes/Thread.html
</a><br>the most important <br>
and "
Any threads not joined will be killed when the main program exits."<br><br><br><div><span class="gmail_quote">On 7/3/07, <b class="gmail_sendername">Bret Pettichord</b> <<a href="mailto:bret@pettichord.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
bret@pettichord.com
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">marekj wrote:<br>><br>> hmmm... I was thinking that if I have 3 scripts running at the same
<br>> time with -b switch they would get confused at which window to talk to.<br>Take a look at concurrent_search.rb:<br><br>require 'thread'<br>require 'watir'<br><br>def test_google<br> ie = Watir::
IE.start
('<a href="http://www.google.com%27" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.google.com'</a>)<br> ie.text_field(:name, "q").set("pickaxe")<br> ie.button
(:value, "Google Search").click<br> ie.close<br>end<br>
<br># run the same test three times concurrently in separate browsers<br>threads = []<br>3.times do<br> threads << Thread.new {test_google}<br>end<br>threads.each {|x| x.join}<br>_______________________________________________
<br>Wtr-general mailing list<br><a href="mailto:Wtr-general@rubyforge.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">Wtr-general@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/wtr-general" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://rubyforge.org/mailman/listinfo/wtr-general</a>
<br></blockquote></div><br>