How to retrieve value in row[@accessiblename='value']

Ranorex Studio, Spy, Recorder, and Driver.
monkey2012
Posts: 77
Joined: Wed Sep 26, 2012 8:15 pm

How to retrieve value in row[@accessiblename='value']

Post by monkey2012 » Wed Oct 10, 2012 7:45 pm

There are 3 items as follows, is there a way that I can get the "1", "2", or "3" based on "Cell One", "Cell Two", or "Cell Three"?

1. mCell1:
/form[@title~'^mWindow Test]/element[@class='QWidget' and @instance='5']/table/row[@accessiblename='3']/cell[@accessiblename='Cell One']

2. mCell2:
/form[@title~'^mWindow Test]/element[@class='QWidget' and @instance='5']/table/row[@accessiblename='2']/cell[@accessiblename='Cell Two']

3. mCell3:
/form[@title~'^mWindow Test]/element[@class='QWidget' and @instance='5']/table/row[@accessiblename='1']/cell[@accessiblename='Cell Three']

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 to retrieve value in row[@accessiblename='value']

Post by Support Team » Thu Oct 11, 2012 10:12 am

Hi,

you can get the accessiblename of the parent row using following RanoreXPath:
mCell1.Element.Parent.GetAttributeValue("Accessiblename").ToString()
Regards,
Tobias
Ranorex Team

monkey2012
Posts: 77
Joined: Wed Sep 26, 2012 8:15 pm

Re: How to retrieve value in row[@accessiblename='value']

Post by monkey2012 » Fri Oct 12, 2012 4:15 pm

Thanks