IE.ie.visible == false is what i meant, but minimized is also a good point.
Does a minimized browser have an hWnd?
This is complex enough that i'd just rather encourage people to use
IE.ie.hWnd != -1 for now.
BTW, i recently checked in IE#minimize, but i didn't think that maybe it
should be IE#minimise. Any one know the Ruby convention on this kind of
thing. We've been using Pickaxe as our style guide, which is written by a
Brit living in Texas, so i have no idea what his preference is offhand.
At 05:36 PM 8/17/2005, Paul Rogers wrote:
exits? sounds fine. WHat do you mean by hidden, minimised? or, behind
another window or something else Im not thinking of?
Paul
----- Original Message -----
From: Bret Pettichord <[EMAIL PROTECTED]>
Date: Wednesday, August 17, 2005 4:17 pm
Subject: Re: RE: [Wtr-general] Detecting a closed IE
> 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
>
_______________________________________________
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