How can I validate text in Ranorex.container object?

Class library usage, coding and language questions.
ruchib3
Posts: 8
Joined: Tue Dec 28, 2010 7:06 am

How can I validate text in Ranorex.container object?

Post by ruchib3 » Fri Mar 04, 2011 5:14 am

Hi,

I am having a object of type Ranorex.container. It is a text box but this is how Ranorex is recognizing it. It has some text say 5000. Now I want to validate the text. Could you please let me know how can I do this? This is bit urgent also. Quick replies would be really appreciated.

When I validate it using recorder to identify the properties, there is no property as text or textvalue. No other property also displays 5000.

Thanks,
Ruchi

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: How can I validate text in Ranorex.container object?

Post by Support Team » Fri Mar 04, 2011 10:26 am

Hi,

Please could you post us a Ranorex Snapshot of the element.
How to create a Ranorex Snapshot:
http://www.ranorex.com/support/user-gui ... files.html

Have you tried to Spy the object yet? Maybe the parent of the text element contains the expected information you need.

Regards,
Peter
Ranorex Team

ruchib3
Posts: 8
Joined: Tue Dec 28, 2010 7:06 am

Re: How can I validate text in Ranorex.container object?

Post by ruchib3 » Fri Mar 04, 2011 11:02 am

Hi,

Yes I have done object spy on the object. I cannot share the snapshot here as that's against my company policy. But can try to explain in detail.

the xpath is something like: /form/container/container[@controlnale='tablelayoutPanel]/element/container......[@classname = 'abc']/element[@automationid='xyz']/text/container[@automationid='qw']

Now when I start recording and click validate, I don't get any property that has value as 5000.
During spy, it displays the object as Container in role. Classname is Scrollviewer.

Now I want to validate the text that it contains 5000.

Thanks,
Ruchi

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: How can I validate text in Ranorex.container object?

Post by Support Team » Fri Mar 04, 2011 11:57 am

Hi,

Would it be possible to send us a snapshot to [email protected] ?

From the posted RxPath I can see the the element before the container is a text element. In WPF it is sometimes tricky because you have to adapt the RxPath manually after the recording. But you can also use the "scroll element level" functionality during a Validation step to the the text element.
Therefore please take a look to following documentation:
http://www.ranorex.com/support/user-gui ... rding.html

You will find a section called Recorder Hot-Keys, please take the attention on this one.

Regards,
Peter
Ranorex Team