hi bret, On 07/09/05, Bret Pettichord <[EMAIL PROTECTED]> wrote: > The easy way to avoid this problem is to never shut down the last client > until we are done testing. > > This could be implemented by attaching an extra client (invisible) to a > class variable of Watir::IE when IE.new was first called. I think this > would be a wholey reliable fix. I'm not sure the cost in performance, but > it could be measured. > > Thoughts?
this sounds like it will work in most circumstances -- except for when you have tests that need to clear the session (though this might be solvable by logging out of the web app). another option is to use the WebBrowser control. it is designed for hosting the browser in a custom client. AFAIK it doesn't lauch an new process for the COM server like IE does; however, it will need to be hosted in some custom winform. btw, i looked up how i solved this problem before: we just interacted with the mshtml library directly. we were using the mshtml engine to help with unit testing javascript, hence we didn't need to pop up a browser window; so, this approach worked for us, but i don't know if it will work for watir. also, for anyone interested, i've written some C# code around IE to help do test-first UI development of ASP.NET code. it enables you to "reveal" an ASP.NET web control in IE from within your unit test. (i just need a good name for the library before i open source it). email me if you want a look at the code. 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
