take a look at css test in the unit tests directory. That does something simlar 
to what you need.

I think you need to do something slightly different:

 if /none/i.match(  ie.span(:id , 'xxx').getOleObject.style.cssText )
    puts "its hidden"
else
    puts "displayed!"
end
Content-Type: multipart/alternative; 
        boundary="----=_Part_22865_26673201.1132081211626"


------=_Part_22865_26673201.1132081211626
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

I have a span that is not disabled, as follows:
 <span id=3D"ChangeProfileControl_FirstnameRequiredValidator"
controltovalidate=3D"ChangeProfileControl_first_name" errormessage=3D"Pleas=
e
enter your first name." display=3D"Dynamic"
evaluationfunction=3D"RequiredFieldValidatorEvaluateIsValid" initialvalue=
=3D""
style=3D"color:Red;display:none;">Please enter your first name.</span>
  Certain user actions cause the text within this span to show up in red,
otherwise it is hidden to the user.
 simply doing an ie.contains_text(span.text) does not work because
I still get non nil result whether the span is shown in red or not.
 Is there anyway around this so that I can test whether the text in the spa=
n
is on the page or not?
 Shao

------=_Part_22865_26673201.1132081211626
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<div>I have a span that is not disabled, as follows:</div>
<div>&nbsp;</div>
<div>&lt;span id=3D&quot;ChangeProfileControl_FirstnameRequiredValidator&qu=
ot; controltovalidate=3D&quot;ChangeProfileControl_first_name&quot; errorme=
ssage=3D&quot;Please enter your first name.&quot; display=3D&quot;Dynamic&q=
uot; evaluationfunction=3D&quot;RequiredFieldValidatorEvaluateIsValid&quot;=
 initialvalue=3D&quot;&quot; style=3D&quot;color:Red;display:none;&quot;&gt=
;Please enter your first name.&lt;/span&gt;
</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>Certain user actions cause the text within this span to show up in red=
,</div>
<div>otherwise it is hidden to the user.</div>
<div>&nbsp;</div>
<div>simply doing an ie.contains_text(span.text) does not work because</div=
>
<div>I still get non nil result whether the span is shown in red or not.</d=
iv>
<div>&nbsp;</div>
<div>Is there anyway around this so that I can test whether the text in the=
 span</div>
<div>is on the page or not?</div>
<div>&nbsp;</div>
<div>Shao</div>
<div>&nbsp;</div>

------=_Part_22865_26673201.1132081211626--
_______________________________________________
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