Page 1 of 1
Testing Fails because
Posted: Tue May 15, 2018 1:28 pm
by ahmedwaheed
I am recording test for IBM Rational Rhapsody
When I Run the test it fails as it can not find an item although it exists, I checked and found out that the parent form of the element changes its ID each time, as in the attached snapshot (target item is "Tree 6131" and it is inside a the highlighted form whose id is variable)
How can I overcome this problem?
Re: Testing Fails because
Posted: Wed May 16, 2018 9:23 am
by qwertzu
Hi Ahmed,
If the id of the parent form doesn't remain the same, you should rather use some other attribute in the path to your element.
Maybe you can find an attribute which doesn't change.
Detailed information about adapting paths can be found here:
https://www.ranorex.com/help/latest/ranorexpath
regards, qwertzu
Re: Testing Fails because
Posted: Wed May 16, 2018 9:25 am
by Stub
I try to pick something unique about a form or control which doesn't change over time, in order to identify it. For us, control IDs fluctuate for various reasons. I've lately taken to setting an unused and unseen control label so I can easily identify the control/form/table that I'm after. I know absolutely nothing about this Rational Rhapsody though.
Re: Testing Fails because
Posted: Thu May 17, 2018 7:41 am
by odklizec
Hi,
Just an additional note. I would suggest to read below blog post, describing how to work with dynamic IDs and how to set Ranorex xpath weight, to prefer different than default attributes...
https://www.ranorex.com/blog/automated- ... namic-ids/