Unable to identify grid elements by record and play method

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
itsmecom
Posts: 5
Joined: Thu Aug 31, 2017 10:20 am

Unable to identify grid elements by record and play method

Post by itsmecom » Thu Aug 31, 2017 10:31 am

Requirement : I am trying to record a workflow wherein I have to expand items in a grid and validate the presence of values, corresponding to sub items.

Process : As I record, the steps generated in turn, consider each item/sub-item as the grid (table) only, instead of exact item/sub-item.

Result: When I execute the test case, it performs all the steps (so it says) and provides the result as SUCCESS.

Issue : It doesn't ACTUALLY perform any step. As expected (since the item Ranorex tries to click is a table (instead of a button, as it should have been)!

Other information regarding the grid : AccessibleName - Grid-control; AccessibleRole - Table

User avatar
RobinHood42
Posts: 239
Joined: Fri Jan 09, 2015 3:24 pm

Re: Unable to identify grid elements by record and play method

Post by RobinHood42 » Fri Sep 01, 2017 11:13 am

Hi itsmecom,

Is it possible to track the sub elements within your grid at all? Please provide a Ranorex snapshot file, this would help to understand the structure of your application under test.

Cheers,
Robin 8)

itsmecom
Posts: 5
Joined: Thu Aug 31, 2017 10:20 am

Re: Unable to identify grid elements by record and play method

Post by itsmecom » Tue Sep 05, 2017 1:38 pm

Hi Robin,


We have figured out work around for tracking sub elements, so, Yes, tracking sub elements is possible.

PFA the screenshot of the grid.

Requirement: I wish to identify the field containing value H (marked in maroon, inner box)

Availability: Ranorex if considering each and every sub item as the main table only (market in red, outer box)


Regards,
Rashmi Sharma
Attachments
Grid.png
Grid.png (55.18 KiB) Viewed 614 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Unable to identify grid elements by record and play method

Post by odklizec » Wed Sep 06, 2017 7:27 am

Hi,

Please upload a Ranorex snapshot (not screenshot!) of the problematic element. Without snapshot, it's pretty hard (if not impossible) to suggest something reliable. Thanks.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

itsmecom
Posts: 5
Joined: Thu Aug 31, 2017 10:20 am

Re: Unable to identify grid elements by record and play method

Post by itsmecom » Thu Sep 07, 2017 5:08 am

Application_Snapshot.zip
(1.27 MiB) Downloaded 26 times
PFA the Ranorex snapshot as requested.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Unable to identify grid elements by record and play method

Post by odklizec » Thu Sep 07, 2017 7:35 am

Hi,

Well the table seems to be pretty complex and your description of the problem is somewhat vague ;) OK, to simply find a cell, containing 'H' letter, you can use xpath like this:

Code: Select all

/form[@controlname='ApplicationFrame']//container[@controlname='Grid-Control']/table[@accessiblename='RoutingGrid']/*[@visible='True']//Text[@AccessibleValue='H']
(you may remove the part checking the elements visibility)
However, you might be in trouble, if there is more than just one 'H' cell available? Could this happen? Do you simply need to find the first cell with H or all of them? Please be as specific as you can with description of the problem you are facing. Thanks ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

itsmecom
Posts: 5
Joined: Thu Aug 31, 2017 10:20 am

Re: Unable to identify grid elements by record and play method

Post by itsmecom » Fri Sep 08, 2017 7:14 am

Hi Pavel,

I'll try to be more elaborate here :)

Requirement : Identify various cells (similar to the one containing value H). The values might or might not be same.
Solution : We can use "AccessibleName" instead of "AccessibleValue"

Issues :
1. We CANNOT record the entire workflow with RECORD AND PLAY approach. Since, the object that's added in repository, at each step, is the grid as a whole, and not the actual cell.
2. We're expected to add each cell(grid item) into the repository, MANUALLY.
(a) If the hierarchy upto the cells is same, I can simply copy paste the repository items and modify them later.
(b) If the hierarchy is different, I have to manually locate each item, through Ranorex Element Browser.
3. We're made to identify the accessible name of each cell, and update the same in x path.

Request you to provide an approach (may be an add-in or something) with which Ranorex can identify our cells in the grid, and we can record the entire workflow with Record-And_Run approach; without having to add (and then update) each cell in the repository.


Regards,
Rashmi Sharma

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3930
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Unable to identify grid elements by record and play method

Post by odklizec » Fri Sep 08, 2017 7:28 am

Hi,

I'm afraid, the interface you are trying to automate is not record-friendly. Or better said, the interface is somewhat quirky. The whole grid added to repository during recording is some kind of "dummy" grid, which is completely empty. And because the actual grid (with cells) is placed under that "dummy" grid (in GUI tree), this is why Record picks the whole dummy grid instead of actual grid. I'm not sure there is something you can do about this, except to add the elements manually to repo. Eventually, ask the AUT developers about the reason of dummy grid overlaying the actual grid. And finally, you may try to contact Ranorex folks directly at [email protected] and ask them if they have a solution/suggestion for this kind of issue.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration