didnt some one post a is_visible?  ( or visible?)  method to the list?
I think it walked up the dom tree looking to see if parent elements were 
visible, as the approach here wont work if the element that encloses the span ( 
if there is one ) is also hidden.

Paul
  ----- Original Message ----- 
  From: Ċ½eljko Filipin 
  To: [email protected] 
  Sent: Thursday, December 21, 2006 2:45 AM
  Subject: Re: [Wtr-general] How to verify if SPAN is visible


  For

  <span style="color: Red; visibility: visible;" 
id="MainLogin_PasswordRequired">*</span>

  you can use

  irb(main):015:0> ie.span(:id, "MainLogin_Password").html 
  => "<SPAN id=MainLogin_PasswordRequired title=\"Password is required.\" 
style=\"VISIBILITY: visible; COLOR: red\">*</SPAN>"
  irb(main):016:0> ie.span(:id, "MainLogin_Password").html =~ /visible/ 
  => 85
  irb(main):017:0> ie.span(:id, "MainLogin_Password").html =~ /hidden/
  => nil

  It is similar when span is hidden.

  Is this useful for you? Let me know if it is to cryptic, I will add more 
detail. 
  -- 
  Zeljko Filipin
  zeljkofilipin.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

Reply via email to