I have tried to record the same step over and over.
I am clicking A Cancel button on my AddProfile screen.
Ranorex keeps assuming I am clicking a Yes button on a completely different screen.
Then, of course , it fails on replay because it is looking at the wrong stupid button.
How do I guarantee it gets the correct element?
Recorder snapping to the wrong repository element.
Re: Recorder snapping to the wrong repository element.
I solved this by taking a guess, and editing androidelement/text[3] to text[2].
Re: Recorder snapping to the wrong repository element.
Hi,
There is no need to "guess" something. If you try the xpath in Spy, you should see if the path is unique or not. If there is more than just one element found for given xpath, Ranorex always uses the first found.
There are two possibilities why you script clicked wrong element. The xpath you first used was either wrong or it changed between the runs? Unfortunately, using element indexes is the least reliable method to identify elements. If there are no other identification attributes you could use in your xpath, you can try to use relationship operators to find proper element based of related (or completely different) elements.
It would be nice if you could post a Ranorex snapshot from your app and the problematic xpath you are using. Maybe we can suggests better way to identify your element than using element index.
There is no need to "guess" something. If you try the xpath in Spy, you should see if the path is unique or not. If there is more than just one element found for given xpath, Ranorex always uses the first found.
There are two possibilities why you script clicked wrong element. The xpath you first used was either wrong or it changed between the runs? Unfortunately, using element indexes is the least reliable method to identify elements. If there are no other identification attributes you could use in your xpath, you can try to use relationship operators to find proper element based of related (or completely different) elements.
It would be nice if you could post a Ranorex snapshot from your app and the problematic xpath you are using. Maybe we can suggests better way to identify your element than using element index.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
Re: Recorder snapping to the wrong repository element.
Thank you for your offer, but I do not rightly understand how to get a snapshot at the moment.
-
- Certified Professional
- Posts: 455
- Joined: Tue Feb 18, 2014 2:14 pm
- Location: Co Louth, Ireland
- Contact:
Re: Recorder snapping to the wrong repository element.
You can read how to do that at Creating Ranorex Snapshot Files.stapes wrote:...I do not rightly understand how to get a snapshot at the moment.