I use a Click Activity for select a button in a web page but the value of the
“parentid” change everytime at each execution.
<webctrl idx='2' isleaf='1' parentid='97' tag='DIV' />
Sometimes the value is 94 or 95 … The Click doesn’t work …
Any ideas ?
August 29, 2019, 3:19pm
The easiest way to find reliable selectors would be to use the Repair function:
You can refresh your page, do a Repair and it will automatically find the difference and try to adapt your selector. If not, then I would look for another property instead of parentid.
Thank for your answer. It’s better but …
No error code, but the Click is just near the button … not on the button …
(Pablo Sánchez Hernández)
August 30, 2019, 11:52am
If it isnt working with the new selector, try to use Anchor activity. Put a good selector (one which is not failing) as an anchor base, select where is that anchor (Top,Bottom,Right,Left) and use the action click.
If you do fine, it should work. Let me know if you have any doubt.
August 30, 2019, 12:27pm
One question - does the green Validate field disappear after you refresh the button (for it to change the parentid)?
If yes, then the Repair button should become active. Could use it then to re-select your button? It should adapt the selector to only use properties that are still shared between the two instances of the button.
Thank for your answer,
How I can use Anchor activity ? With “Find Element” Activity ?
I have tried but it’s doen’s works too.
First step, I have green validate and when I execute, it doesn’t work :
I use repair button and I have a new selector
For the first and second execution, it works. After, I haven’t error, but the cursor click near the button, not on the button …
August 30, 2019, 1:29pm
Could you maybe share the available properties as visible in UiExplorer? There has to be a way to make it more reliable
August 30, 2019, 1:36pm
Yes, could you try and add the
Title to the selector? The IDX should then disappear.
In general, you want to aim to use as much as “human” readable bits in the selector as possible (instead of ids)
With the Title selector, I have the same problem. The click is near the button
thanks for your help
August 30, 2019, 2:08pm
If I got you correctly, this is the ‘second’ selector after it got repaired. Could you show us the tree of the original one?
yes of course !
This is the original
The problem is with the
parentId tag who changes everytime I execute the project.
Thanks for your help
August 30, 2019, 2:15pm
Does the parent Class tag also change? (I’m not sure if there are any digits after it). If not, on the first look I would try with:
It should remove all IDs from the selector, hopefully
Basically, this should be the way to fix it. You can play around with properties on this level, as well as levels above. Simply select the line above:
And you will have a bunch of other properties to choose from on the right side.
You should play around with it until a working, stable selector is found.
I had : Class, parentClass, title, isleaf and it’s better.
I would like to try next monday before resolve the problem.
Than you so much !!
I have tried and same problem. Click but near the button and not on the button
It’s beause I have two screen and the browser is open on an other screen. I guess …
August 30, 2019, 3:11pm
Och! That changes things a bit, maybe
Could you check the Scaling of your screen and make sure both screens are set to the same scaling? Or simply both to 100% just to test.
Ok so I used the Maximize Windows Activity, and it’s works for the moment. I would like to test tomorow.
Thank you for your help
October 18, 2019, 3:04pm
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.