Problem with ParentId TAG with Click Activity on a Browser

Hi !

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 ?

Thank you,

regards.

Hi @Emi_Zehcnas

The easiest way to find reliable selectors would be to use the Repair function:
image

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.

2 Likes

Hi !

Thank for your answer. It’s better but …

No error code, but the Click is just near the button … not on the button …

1 Like

@Emi_Zehcnas

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.

KR,
Pablo

2 Likes

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.

2 Likes

Hi,

Thank for your answer,

How I can use Anchor activity ? With “Find Element” Activity ?

I have tried but it’s doen’s works too.

:frowning:

So,

First step, I have green validate and when I execute, it doesn’t work :

I use repair button and I have a new selector :slight_smile:
image

For the first and second execution, it works. After, I haven’t error, but the cursor click near the button, not on the button …

Could you maybe share the available properties as visible in UiExplorer? There has to be a way to make it more reliable :slight_smile:

Hi !

You need this ?

Thank you for your help

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)

1 Like

With the Title selector, I have the same problem. The click is near the button :frowning: thanks for your help

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

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:

  • parentClass
  • tag
  • title

It should remove all IDs from the selector, hopefully :slight_smile:

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:
image
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 !!

1 Like

I have tried and same problem. Click but near the button and not on the button :frowning:

It’s beause I have two screen and the browser is open on an other screen. I guess … :frowning:

Och! That changes things a bit, maybe :smiley: 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.

1 Like

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

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.