RanoXPath in table

Ranorex Studio, Spy, Recorder, and Driver.
fknuvers
Posts: 4
Joined: Wed Mar 28, 2012 8:06 am

RanoXPath in table

Post by fknuvers » Wed Mar 28, 2012 8:24 am

Hi,
I'm quite new to Ranorex and RanoreXPath. I'm working with my application and I'm not sure how to do the following:
I've got a usertable in which I need to select a row in which a certain user is present:

tbody/tr[7]/td[1]/div[@innertext~'^PRCS\ User\ Consultant\ \ \ \ \ '] (in this case a consultant)

After the user there are three columns with a checkbox for adding as a leader, a member or a viewer of my project.

tbody/tr[7]/td[4]/div/input[@id='V6']

Now I don't know how to combine these to find the user and then select the right checkbox.
Also the [7] presents rows ad columns. Should I change these to find the proper row?
I hope someone can help me out.

Kind regards, Frans

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

Re: RanoXPath in table

Post by Support Team » Wed Mar 28, 2012 11:38 am

Hi,

have a look at following paragraph of a blog post which explains how to identify the telephone number in a row holding a specific name using RanoreXPath:
http://www.ranorex.com/blog/ranorexpath ... Attributes


Regards,
Tobias
Ranorex Team

fknuvers
Posts: 4
Joined: Wed Mar 28, 2012 8:06 am

Re: RanoXPath in table

Post by fknuvers » Thu Mar 29, 2012 3:31 pm

Hi,

I've tried to make the repository item work according to the link you supplied.
I'm afraid it didn't work and I don't really understand how to do this.
I'm trying to select the Edit link where the user has a certain name.
Now I've tried several solutions:

Solution 1:
Try to select a checkbox where the Name = PRCS User Consultant

tbody/tr/td/div[@innertext~'PCRS User Consultant.+']/td/div/a[@innertext='Edit']
The result is that the recording can't find the item.


Solution 2:
Select the row with the Name and select the following-sibling cell:

table/tbody/tr[6]/td[1]/div[@innertext'~PRCS User Consultant.+']/following-sibling::cell

As long as I don't put the /following-sibling::cell in the command the Highlight Element will find the object.
When i add /following-sibling::cell and chose to highlight the object, it can't be found.


Solution 3:
Select the row with de Name and try to select the checkbox:

table/tbody/tr/td/div[@innertext~'PRCS User Consultant.+']/../div/input
When I want to highlight the element, I get a message stating:
The item exists but could not be highlighted because it could not be made visible.

Although I've been trying for several hours, I can't find the correct solution.
I hope someone can help me out as I really need to use this option in my tests.

Frans

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

Re: RanoXPath in table

Post by Support Team » Fri Mar 30, 2012 12:08 pm

Hi,

Please send us a Ranorex Snapshot file of the specific table.
This Snapshot will help us analyzing the structure of your application.
Following link will show you how to generate a snapshot file.

Thanks in advance!

Regards,
Markus
Ranorex Support Team

fknuvers
Posts: 4
Joined: Wed Mar 28, 2012 8:06 am

Re: RanoXPath in table

Post by fknuvers » Fri Mar 30, 2012 2:47 pm

Hi,
With this post I send the snapshot file. I can't attach a screenshot file as I use OpenOffice.
My trial period expires tomorrow, so I hope to get an answer soon.
Kind regards, Frans
You do not have the required permissions to view the files attached to this post.

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

Re: RanoXPath in table

Post by Support Team » Mon Apr 02, 2012 11:17 am

Hi,

can you please provide us a snapshot file holding the whole table and not only the target tag.

Regards,
Tobias
Ranorex Team

fknuvers
Posts: 4
Joined: Wed Mar 28, 2012 8:06 am

Re: RanoXPath in table

Post by fknuvers » Mon Apr 02, 2012 4:12 pm

Hi,
With this reply I enclose two files I sent before by E-mail. I'm not sure if there's enough information in the files. I Can't make new snapshot files as my trial license has expired and my employer has not decided yet if he wants to buy a license.
Kind regards, Frans
You do not have the required permissions to view the files attached to this post.

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

Re: RanoXPath in table

Post by Support Team » Tue Apr 03, 2012 1:54 pm

Hi,

I'm sorry, but the snapshots are not very useful.
Without having a snapshot covering the whole table we cannot provide you a fitting solution.

Regards,
Tobias
Ranorex Team