How about just 'exists?'
Note that the algorithm below will return false if the browser is hidden.
Is that what you want?
Bret
At 01:41 PM 8/17/2005, Paul Rogers wrote:
Do you have check in rights?
Bret, I think this would be a useful addition - is the method name corect?
maybe Window_exists?
Paul
----- Original Message -----
From: Peter Chau <[EMAIL PROTECTED]>
Date: Wednesday, August 17, 2005 11:47 am
Subject: RE: [Wtr-general] Detecting a closed IE
>
>
> Thanx this works
>
> class IE
> def window_exists?
> begin
> return false if @ie.hWnd== -1
> return true
> rescue
> return false
> end
> end
> end
>
>
> if __FILE__ == $0
> require 'neteller'
> Test::Unit::TestCase
>
> class TC_ie < Test::Unit::TestCase
>
> def test_open
> openIE=Watir::IE.new
> assert(openIE.window_exists?)
> openIE.close
> end
>
> def test_close
> closeIE=Watir::IE.new
> closeIE.close
> assert_false(closeIE.window_exists?)
> end
>
> end
> end
>
>
>
> _______________________________________________
> 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
_____________________
Bret Pettichord
www.pettichord.com
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general