Page 1 of 1

How to validate SpanTag Disable property.

Posted: Mon Aug 27, 2012 12:20 pm
by archana
Hi ,

I want to validate Span Tag is enable or disable property. As in Ranorex it always gives
SpanTag -> Enabled =TRUE .
Even though Span Tag control is disabled still It gives FALSE value for Enabled property.

So,how to check Disable property of Span Tag.

Thanks,
Archana

Re: How to validate SpanTag Disable property.

Posted: Mon Aug 27, 2012 2:01 pm
by Support Team
Hi,

Which Ranorex version are you using?
How do you set the disable attribute? Can you send us the HTML script of that element?
A Ranorex Snapshot file would also be helpful.
Following link will show you how to generate a snapshot file:
Creating Ranorex Snapshot Files.

Thanks,
Markus
Ranorex Support Team

Re: How to validate SpanTag Disable property.

Posted: Mon Aug 27, 2012 2:08 pm
by krstcs
Archana,

More than likely this is an issue with the application under test, not Ranorex.

Some web apps (especially extjs) do not set the properties for enabled/disabled as they should. They instead use the stylesheet and classes to show the state.

You may need to check the tag's class property to determine the state.

Re: How to validate SpanTag Disable property.

Posted: Thu Aug 30, 2012 8:01 am
by archana
I got one way to find out enable /disable property of span Tag :-
Go to parent element(DIV TAG) of Span Tag
Check InnertHtml of DIVTAG
It shows disabled property there.

But still this is not full proof solution as this code changes as per browser like :-

For IE9 - InnerHtml of DIVTAG :-
<DIV style="BACKGROUND-COLOR: #fff; CURSOR: default" class=first_li jQuery16103834797309296775="80"><SPAN>Insert Term</SPAN></DIV>
<DIV style="BACKGROUND-COLOR: #fff; CURSOR: default" class=first_li jQuery16103834797309296775="81"><SPAN>Accept change</SPAN></DIV>
<DIV style="BACKGROUND-COLOR: #fff; CURSOR: default" class=first_li jQuery16103834797309296775="82"><SPAN>Reject change</SPAN></DIV>

For Mozilla-InnerHtml of DIVTAG :-
<div style="background-color: rgb(255, 255, 255); cursor: default;" disabled="" class="first_li"><span>Insert Term</span></div>
<div disabled="" class="first_li"><span>Accept change</span></div>
<div disabled="" class="first_li"><span>Reject change</span></div>


It will be great and very helpful for me if you can put some light on it.

Re: How to validate SpanTag Disable property.

Posted: Thu Aug 30, 2012 3:18 pm
by krstcs
Check the "class" property. As I said above, some javascript libraries change the class to reflect changes to the object, instead of changing the property directly.

Manually check the class with Spy to see if there is a change to the class when the status of the object (enabled/disabled) changes.