As for the whole browser reusing issue, it's really all about how you want to 
implement it. There is the Watir method in the IE object `attach( :how, what )` 
that is very helpful for this. 

Depending on the innerworkings of your application as they pertain to cookies, 
session ids, etc., it may be best to "log out" of your application if this is 
applicable, or you may want to close the browser at the end of each test.

Ideally your tests should be very granular and map as closely to the business 
process the user would have to work through. If you create a custom class for 
your app, just make the method that initializes the object in your Unit Test's 
"setup()" method conditional. Setups a begin / catch / ensure exception 
handling block that first attempts to attach (Watir::IE::attach()) to your IE 
windows, if the exception is throw, just handle it by instantiating a new 
window using (Watir::IE::start()).

I'm not sure of your particular application's behavior, and you may need to 
close the browser window after each test and create a new one at the beginning 
of each test. This would probably be rare though. Although it does increase 
overall test [suite] execution time, it's probably a good practice to do so.

Let me know if you need any more explanation on this, as I felt I was kinda 
rambling.

Thanks!
Nathan Christie
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6344&messageID=17883#17883
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to