I believe this is possible with standard XPath strings using contains() and combining XPath strings, but I'm having trouble implementing this with Ranorex.
For instance, searching for a row index 1, cell index 1 = hello and cell index 2 = world.
Rather than just searching for 'hello' in the one cell, I want to search for both 'hello' and 'world' in each respective cell.
Can I achieve this with RanoreXPath?
Using RanoreXPath to identify two columns in one row?
Re: Using RanoreXPath to identify two columns in one row?
For a HTML DOM object it could be:
http://www.ranorex.com/support/user-gui ... ditor.html
Checkout that page for a lot of other relational operations.
Code: Select all
//table/tbody/tr/td[@innertext='hello']/following-sibling::td[@innertext='world']
Checkout that page for a lot of other relational operations.
Shortcuts usually aren't...
Re: Using RanoreXPath to identify two columns in one row?
Thank you, krstcs! That was exactly what I needed.
Re: Using RanoreXPath to identify two columns in one row?
You are very welcome.
I use parent:: all the time. I will use a title or other sub-heading to identify the whole group (a row in a table, for example) and then back out of it to "home" all of the row's objects.
This points to the row containing a td/span with the innertext of "My Widget":
You can get really fancy with it if needed.
I use parent:: all the time. I will use a title or other sub-heading to identify the whole group (a row in a table, for example) and then back out of it to "home" all of the row's objects.
This points to the row containing a td/span with the innertext of "My Widget":
Code: Select all
//table/tbody/tr/td/span[@innertext="My Widget"]/parent::td/parent::tr
Shortcuts usually aren't...