>          # creating a new IE instance immediately after quiting a previous one
>          # causes intermittent RPC unavailable errors and other weirdness.
>          # Make sure to wait 1 second after eating before swimming...
>          until (Time.now - @@closed_last) > 1; sleep 0.1; end if @@closed_last
> 
> immediate preceeds:
> 
>          @ie = WIN32OLE.new('InternetExplorer.Application')
> 
> Any reason we shouldn't add this code to Watir?

yes.  2 reasons:
1) it will slow down your tests substantially.  1 second doesn't seem
like a long delay for a single test, but it quickly adds up.
2) this may still produce intermittent failures on slow machines or
servers under heavy load.

i still haven't looked at the code that we used to deal with this
problem.  one approach that i remember that we tried was to monitor
the list of running processes to ensure that the closed ie process had
properly terminated -- the test thread would simply wait until the ie
process it had created was gone.
i think that we ended up coming up with something more elegant using
the COM api, but i can't remember what it is.
cheers,
owen.
-- 
Owen Rogers | http://dotnetjunkies.com/weblog/exortech |
CruiseControl.NET - http://ccnet.thoughtworks.com

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to