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 <[EMAIL PROTECTED] > 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
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general