Hi Team,
Below is the dynamic path which is getting change in every spy
/menubar[@processname='explorer']/container[@controlid='40965']//toolbar[@accessiblename='Running applications']/button[29]
Dynamic part is --- button[29]
could you please help how to make dynamic path?
How to make dynamic path for button array
Re: How to make dynamic path for button array
Hi,
Could you please post a Ranorex snapshot (NOT screenshot) of the problematic button? Without seeing, at very least, Ranorex snapshot, it's impossible to suggest something reliable. Generally speaking, it may be enough to simply remove button's index from the xpath. But if there are more buttons, it will most certainly return multiple buttons. Hence we need to see the snapshot, to determine the best approach. If there are no other identification attributes (like text, inner text or similar), you will most probably have to use another element as anchor, from which you must traverse to correct button (via relationship operators).
Could you please post a Ranorex snapshot (NOT screenshot) of the problematic button? Without seeing, at very least, Ranorex snapshot, it's impossible to suggest something reliable. Generally speaking, it may be enough to simply remove button's index from the xpath. But if there are more buttons, it will most certainly return multiple buttons. Hence we need to see the snapshot, to determine the best approach. If there are no other identification attributes (like text, inner text or similar), you will most probably have to use another element as anchor, from which you must traverse to correct button (via relationship operators).
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 to make dynamic path for button array
Hi ,
I have attached the snapshot.
I have attached the snapshot.
- Attachments
-
- DynamicButton.zip
- (32.9 KiB) Downloaded 16 times
Re: How to make dynamic path for button array
Hi,
It seems that the buttons contain accessible names and texts, so you can use something like this:
It seems that the buttons contain accessible names and texts, so you can use something like this:
/menubar[@processname='explorer']/container[@controlid='40965']//toolbar[@accessiblename='Running applications']/button[@accessiblename~'Label Print Module'][@visible='true']
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