Greetings:
I am trying to record a link to an external resource. Ranorex records the click event successfully, but when I attempt to run the recording, I have found that the test has actually recorded both lines (meaning one word on one line and the next word on the other line). Ranorex grabbed both lines according to the screen shot.
Ranorex recorded:
/dom[@domain='somewebsite.com']/body/div[2]/div[5]/div/div[2]/div[2]/?/?/a[@innertext='Emotional health']
When I edit the path, Ranorex is able to track to it the combined words successfully
I tried to change the location of the click to upper right or lower left, but at run time it clicks on the wrong link instead of the recorded one.
I have attached a screen shot for reference.
Thank you.
Test Run is not detecting a recorded path
Test Run is not detecting a recorded path
You do not have the required permissions to view the files attached to this post.
-
- Certified Professional
- Posts: 455
- Joined: Tue Feb 18, 2014 2:14 pm
- Location: Co Louth, Ireland
- Contact:
Re: Test Run is not detecting a recorded path
You could try changing the path so that it only looks for the first word, i.e. to something like:
/dom[@domain='somewebsite.com']/body/div[2]/div[5]/div/div[2]/div[2]/?/?/a[@innertext>Emotional']
I'd also suggesting taking the index values out of the divs in your path, as those values often change on a live website. i.e. your div s would look like this "div/" and not this "div[2]/".
/dom[@domain='somewebsite.com']/body/div[2]/div[5]/div/div[2]/div[2]/?/?/a[@innertext>Emotional']
I'd also suggesting taking the index values out of the divs in your path, as those values often change on a live website. i.e. your div s would look like this "div/" and not this "div[2]/".
Re: Test Run is not detecting a recorded path
Thank you, Fergal, for your suggestion. I was able to resolve the issue by changing Recorder defaults from None to Pixel. Now the question is do I set the default back to None or keep it on Pixel? I have usually recorded in None, but it isn't clear what best practice is, so I'm inclined to set it back to None. Any suggestions are a learning lesson for me.
Secondly, everything I have recorded up to this point shows all the div[#] with their indexes. Is there a way to avoid that while recording? I have just started this site for automation and would like to get any settings configured now if there is a way that I won't have to touch every recorded line in spy.
I am very weak on the Ranorex paths and am in a learning mode. Anyone please share tips, tricks, reading so I can understand how to tweak these paths to be more robust and successful in execution.
Thanks to all!
Secondly, everything I have recorded up to this point shows all the div[#] with their indexes. Is there a way to avoid that while recording? I have just started this site for automation and would like to get any settings configured now if there is a way that I won't have to touch every recorded line in spy.
I am very weak on the Ranorex paths and am in a learning mode. Anyone please share tips, tricks, reading so I can understand how to tweak these paths to be more robust and successful in execution.
Thanks to all!
-
- Certified Professional
- Posts: 455
- Joined: Tue Feb 18, 2014 2:14 pm
- Location: Co Louth, Ireland
- Contact:
Re: Test Run is not detecting a recorded path
My preference is to use None whenever possible, because it helps the tests run on different environments and screen resolutions.
I edit those manually using the Spy tool, checking each element after the indexes have been removed, to ensure that Ranorex can still identify it. Others may have a different way of doing this.
Re: Test Run is not detecting a recorded path
Thank you, Fergal:
One additional question. In instances like these why don't the wildcards work ( ?, *, // , ..). Better yet, the Axis route (descendants, self, parent, etc). I was under the impression that is what these were for to shorten the path, without compromising the robustness of the run. I made need to go back to webinars and user guide to gain a better understanding.
One additional question. In instances like these why don't the wildcards work ( ?, *, // , ..). Better yet, the Axis route (descendants, self, parent, etc). I was under the impression that is what these were for to shorten the path, without compromising the robustness of the run. I made need to go back to webinars and user guide to gain a better understanding.