Hi,
i have a problem when i recording some tests on a web application.
As you can see in the image,
Ranorex memorize the XPATH of some elements with the src identifier instead of id (for example).
That's not good for me because at the next run, the src is not the same and the test crash.
I have to sobstitute the src identifier with id or others by hand, and that's very frustrating.
Is there a way to tell Ranorex not to use the src identifier for the XPATH for the elements?
Thanks a lot in advance...
Christian
How can i set Ranorex to not use src in XPATH?
How can i set Ranorex to not use src in XPATH?
You do not have the required permissions to view the files attached to this post.
Re: How can i set Ranorex to not use src in XPATH?
Hi Christian,
Yes, it's possible to omit "src" from xpath generation procedure, by lowering its xpath "weight", or by increasing xpath weight of different attribute, you want to be used instead of "src". For more details about xpath weight, please check this user guide chapter...
https://www.ranorex.com/help/latest/ran ... namic-ids/
Basically, you must create a new weight rule, where you should specify "src" attribute with "0" value. By default, iframe src attribute has weight value set to 150. Just decrease this value and you are good to go
Yes, it's possible to omit "src" from xpath generation procedure, by lowering its xpath "weight", or by increasing xpath weight of different attribute, you want to be used instead of "src". For more details about xpath weight, please check this user guide chapter...
https://www.ranorex.com/help/latest/ran ... namic-ids/
Basically, you must create a new weight rule, where you should specify "src" attribute with "0" value. By default, iframe src attribute has weight value set to 150. Just decrease this value and you are good to go
You do not have the required permissions to view the files attached to this post.
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: How can i set Ranorex to not use src in XPATH?
Hi,odklizec wrote: ↑Thu Jul 16, 2020 10:32 amHi Christian,
Yes, it's possible to omit "src" from xpath generation procedure, by lowering its xpath "weight", or by increasing xpath weight of different attribute, you want to be used instead of "src". For more details about xpath weight, please check this user guide chapter...
https://www.ranorex.com/help/latest/ran ... namic-ids/
Basically, you must create a new weight rule, where you should specify "src" attribute with "0" value. By default, iframe src attribute has weight value set to 150. Just decrease this value and you are good to go
2020-07-16_11-35-44.png
thanks a lot, i made a simple test to try this solution and it seems work!
Is there a way to set up this xpath setting for all the projects?
Or have i to do this for each projects?
Thanks a lot in advance
Christian
Re: How can i set Ranorex to not use src in XPATH?
Hi,
You can import settings from one project to another. Open the project you want to update with new src weight rule, open settings and there you should see Import button. Then select rxsettings from the project you already updated. That's all.
You can import settings from one project to another. Open the project you want to update with new src weight rule, open settings and there you should see Import button. Then select rxsettings from the project you already updated. That's all.
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: How can i set Ranorex to not use src in XPATH?
Hi,
i tried but unfortunalty i didn't find the settings tab and the Import button.
Where they are?
Thanks a lot
Christian
Re: How can i set Ranorex to not use src in XPATH?
Down at the bottom-left of the Settings dialog.
Re: How can i set Ranorex to not use src in XPATH?
Hi,
maybe i have to add some panels because i don't see the Setting dialog:
You do not have the required permissions to view the files attached to this post.
Re: How can i set Ranorex to not use src in XPATH?
Press the "Open Settings" button on the toolbar to invoke the Settings dialog.