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 &quot;
Any threads not joined will be killed when the main program exits.&quot;<br><br><br><div><span class="gmail_quote">On 7/3/07, <b class="gmail_sendername">Bret Pettichord</b> &lt;<a href="mailto:bret@pettichord.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
bret@pettichord.com
</a>&gt; 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>&gt;<br>&gt; hmmm... I was thinking that if I have 3 scripts running at the same
<br>&gt; 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 &#39;thread&#39;<br>require &#39;watir&#39;<br><br>def test_google<br>&nbsp;&nbsp;ie = Watir::
IE.start
(&#39;<a href="http://www.google.com%27" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.google.com&#39;</a>)<br>&nbsp;&nbsp;ie.text_field(:name, &quot;q&quot;).set(&quot;pickaxe&quot;)<br>&nbsp;&nbsp;ie.button
(:value, &quot;Google Search&quot;).click<br>&nbsp;&nbsp;ie.close<br>end<br>
<br># run the same test three times concurrently in separate browsers<br>threads = []<br>3.times do<br>&nbsp;&nbsp;threads &lt;&lt; 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>