Ranorexpath and grid questions

Ask general questions here.
Mayra
Posts: 68
Joined: Mon Dec 16, 2013 5:27 am

Ranorexpath and grid questions

Post by Mayra » Thu Jan 09, 2014 3:33 am

I am still evaluating ranorex for our automation needs. I do have a few questions.

1. Our application has a lot of dynamic id's and it just seems that for every other object I need to modify the setting for the weights in order to ignore the id's. I see there is a setting there for Sencha, and even though my app has Sencha controls, it does not filter all the id's.
Is there a setting that would cause a general effect? or even better is there a way where I can tell ranorex to ignore any numbers created in the path for id and regex them because I do not have names or any other unique identification. I would need a couple of properties to make the elements unique:
//div[#'draw-1239'][@class='x-surface x-box-item x-surface-default']/

2. Sometimes the path recorded is not even enough to uniquely identify an element. I need to select a parent in the hierarchy that would narrow the search. It is not easy to do that. Using the spy I can see in the Browser & Results some things that I would want to include in the path. What is the best way to "enhance" the recorded path, it is not intuitive to do it with the browser and results.

3. Can the paths be relative to other items in the repository? For example if I have the path for a section in a page that then has more controls that are children of it, could I have a path that adds to the captured path of the parent? would the recorder recognize that? or do I have to have user modules for it?
Also, I am thinking about maintenance of the repository, I would not want to repeat parts of the path that I had already determined.

4. In the case of grid-views do you have any adapters for them? In some tools I am able to work with tables like cell at row and column, etc. I have a grid that for each tr the td's can have inner cells, spans and images and each tr is unique.

5. What is the specific Sencha support you have? I just want to be aware if there is something that I am missing because I can't tell there are adapters for the controls I am working with.

Thanks.

User avatar
mebner
Posts: 61
Joined: Tue Dec 17, 2013 6:42 pm

Re: Ranorexpath and grid questions

Post by mebner » Thu Jan 09, 2014 3:50 pm

Hi,

We support the web technologies Sencha is based on, so there should be no limitations.
Before answering your questions may I ask you to send me a Ranorex snapshot file of your webpage and the specific grid? This will help us to get a better understanding of your issues regarding the identification of the web elements.
The following link will show you how to generate a snapshot file: Creating Ranorex Snapshot Files.
You can post the snapshot here or you can also send it to [email protected].

Thanks,
Markus

Mayra
Posts: 68
Joined: Mon Dec 16, 2013 5:27 am

Re: Ranorexpath and grid questions

Post by Mayra » Thu Jan 09, 2014 9:22 pm

Attached you will find a snapshot of the grid and another snapshot of other page so you can notice the id's, unfortunately at this time the graphical elements snapshot does not have all the data that I want you to see.
Thanks.
Attachments
GraphicalElementsSnap.rxsnp
(153.48 KiB) Downloaded 106 times
snapShotTable.rxsnp
(322.97 KiB) Downloaded 105 times

Mayra
Posts: 68
Joined: Mon Dec 16, 2013 5:27 am

Re: Ranorexpath and grid questions

Post by Mayra » Thu Jan 09, 2014 10:36 pm

You will see in the snapshot. I have id's inthe middle and end of the names. It would be great to regex them and not filter them, because that along with perhaps the class name will help me out with identification.
In some instances, I am not able to choose another attribute for identification, is it because is "trying" to use the id?
Attachments
Id's.png
Id's.png (179.52 KiB) Viewed 782 times

User avatar
mebner
Posts: 61
Joined: Tue Dec 17, 2013 6:42 pm

Re: Ranorexpath and grid questions

Post by mebner » Mon Jan 13, 2014 2:51 pm

Hi Mayra,

To summarize your issue, the problem is that the ids change when you reload the specific page.
In order to overcome the issue you tried to exclude the ids by adding a rule in the RanoreXPath Weight Editor.
But as I can see from the snapshots there is no other unique attribute which can be used for the object identification.
Now you try to find a way to use regular expressions in combination with the id attribute, right?
In order to help you finding a working RxPath (regular expression)I need to know what part of the id change. Does just the number in between change?
Can you give me an example of such a RxPath?

The id will be automatically used because of the weight of the attribute, which is higher than for instance the weight of the class attribute, but you can of course manually select another attribute or change the weight of the attributes as described here: Automated Testing and Dynamic IDs.

Regards,
Markus

Mayra
Posts: 68
Joined: Mon Dec 16, 2013 5:27 am

Re: Ranorexpath and grid questions

Post by Mayra » Wed Jan 15, 2014 10:16 pm

Thanks Markus.
Yes, the numbers are the only thing that changes in the ID,that is why I was thinking of a combo of ID and class attribute perhaps.
I met with Martin and he modified my settings to filter the ID's and have the class be the one that is used for recognition. Hopefully that is enough, if not, I will ask again about how to overcome this with the combo of the RegEX instead of filtering.
Thanks.