Hi All,
When I use relative path in my repo , the test run takes too long , any idea ?
my repo item loooks like this :
.//text[@name='Design Length']/following-sibling::text
which is under /form[@title='Settings' ]
why is Relative path slow
Re: why is Relative path slow
Hi,
Sadly, without seeing the application's snapshot, it's hard to tell anything definitive. My best guess is that the xpath is too general and it simply takes too long to search entire app for "Design Length" element and its nearest text? Could you please post a Ranorex snapshot (NOT screenshot) of tested app?
Sadly, without seeing the application's snapshot, it's hard to tell anything definitive. My best guess is that the xpath is too general and it simply takes too long to search entire app for "Design Length" element and its nearest text? Could you please post a Ranorex snapshot (NOT screenshot) of tested app?
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: why is Relative path slow
how can I take the snapshot of the current repo?
Re: why is Relative path slow
Hi,
You must follow the steps described here:
https://www.ranorex.com/help/latest/ran ... hot-files/
Basically, you must set the app to the expected state, when the repo element is available in UI. Then via Spy, you can create the snapshot of given element. But in your case, i would suggest to save snapshot of entire app and not just the given element. In Spy, select root element of tested app and save its snapshot.
You must follow the steps described here:
https://www.ranorex.com/help/latest/ran ... hot-files/
Basically, you must set the app to the expected state, when the repo element is available in UI. Then via Spy, you can create the snapshot of given element. But in your case, i would suggest to save snapshot of entire app and not just the given element. In Spy, select root element of tested app and save its snapshot.
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: why is Relative path slow
snapshot attached
You do not have the required permissions to view the files attached to this post.
Re: why is Relative path slow
Hi,
As I've expected, the path is simply too short for the UI. Just expand all tree nodes and you will quickly see how many elements there is. And your xpath makes Ranorex to go through all of them, to find all appearances of text[@name='Design Length']. So I would suggest to add few more items to the xpath, like this...
As I've expected, the path is simply too short for the UI. Just expand all tree nodes and you will quickly see how many elements there is. And your xpath makes Ranorex to go through all of them, to find all appearances of text[@name='Design Length']. So I would suggest to add few more items to the xpath, like this...
At next, you are using somewhat old and no longer supported version 8.3.1! It's time to upgrade to, at least, 8.3.3 or 9.0 And finally, there is issued a WPF instrumentation warning, which means that Ranorex identification capabilities are limited with your app! You should try to run Ranorex Studio/Spy in administrator mode. This often helps with similar instrumentation warnings.form//element[@classname='FinalCircuitCableView']/container[@classname='ScrollViewer']//text[@name='Design Length']
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: why is Relative path slow
hi
in addition to what odklizec already mentioned:
Avoiding double slashes (//) will decrease the search time tremendously.
At least using a question mark for each element in between, instead of the double slash, will be way faster.
However, it always depends on your application if the path is still robust enough afterwards.
regards,
qwertzu
in addition to what odklizec already mentioned:
Avoiding double slashes (//) will decrease the search time tremendously.
At least using a question mark for each element in between, instead of the double slash, will be way faster.
However, it always depends on your application if the path is still robust enough afterwards.
regards,
qwertzu
Re: why is Relative path slow
I will try that, Thank you. The main reason to have a relative path is to avoid maintenance issues, not only that if the same element is in the two different places, I need not have to create two different items in the repo, I believe if we have a relative path and we are on the right page/form, it should be quick to find the elements