How to handle click event with buttons that change their name dinamically

Hi everyone,

I´m trying to handle click events on a website which everytime you login, the button´s name change its id for example from “menu_btn_abdc” to “menu_btn_xyza”, is there any way we can map this like “menu_btn_*” so we don’t care about what’s comming after, it will be recognized anyway.

Thanks in advanced

Hi @abdieldeveloper

Check the below thread.

Regards

@abdieldeveloper

You can

Your sample selector will look like this

<webctrl tag='button' name='menu_btn_*' />

Cheers

1 Like

Yeah, edit the selector and put in the wildcard.

Hi, this worked to me in some cases but there is one scenario where it’s not working since there are two buttons with almost the same name, trying to use anchor base but I have no idea how to in the case of buttons

@abdieldeveloper

Try to find some difference in properties…like class or anything and use it

Cheers

Hi,

I’ve tried many methods but none of them worked, the main problem is that everytime the control change its name, it also change the parent and it’s har from UiPath to know the control, in addition to this, we have two buttons on the same line, I’ve spend a lot of hours without finding this solution, wondering. I was thinking about another way to do it like simulate click on specific position, but doesn’t know how to do that, do you?

I found a way to do this by using the click event by position, since the anchor didn’t worked to me because there wasn’t input controls near to it. found the solution in this post

Thanks to all and to @Pradeep_Shiv

1 Like

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