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> </div>
<div><span id=3D"ChangeProfileControl_FirstnameRequiredValidator&qu=
ot; controltovalidate=3D"ChangeProfileControl_first_name" errorme=
ssage=3D"Please enter your first name." display=3D"Dynamic&q=
uot; evaluationfunction=3D"RequiredFieldValidatorEvaluateIsValid"=
initialvalue=3D"" style=3D"color:Red;display:none;">=
;Please enter your first name.</span>
</div>
<div> </div>
<div> </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> </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> </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> </div>
<div>Shao</div>
<div> </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