Lisa Crispin wrote:
If we have really small scripts/test cases, they run fine in a suite. But as we add code to them, we start having a problem where the first
IE browser window does not shut down, and the second script errors out
because there was a window already open. As the scripts get larger,
this happens more consistently.

I ran into a similar issue, once I had more than a few tests in the
suite. The fix I found was to make sure I always got rid of the old IE
instance in the teardown:


    def setup
        @ie = Watir::IE::new()
        @ie.goto(@startingURL)
    end
    def teardown
        if (@ie)
            @ie.close
            # needed to ensure that IE process doesn't get
            # confused by being immediately restarted
            sleep(2)
        end
    end

I had to put the sleep(2) in teardown to make sure that iexplore.exe had
a chance to do its own internal cleanup before launching a new IE instance.




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

Reply via email to