How to make sure that the Selectors activity runs every time succesfully?

I am facing a lot of issues in activities related to selectors, sometimes it works sometimes it doesn’t. Like for instance, I am using Attach Window, Find Element, Get Visible Text, all of it fails Most of the time. What is the best practise to overcome this issue?

1 Like

Hi
Welcome to uipath community

This can done in two ways
One with the activities involved and the selector in it
—first alone along the activities property set the property WaitForReady as Complete so that the bot waits until the element gets completely loaded else to won’t work upon along the sequence and to handle that exception as a best practice we can include those activities inside a TRY BLOCK OF TRY CATCH activity and if any exception occurs it will go to the CATCH block where r can send a note to user with a mail that the process failed because of this

And the second one is with selectors replaced with dynamic values in attributes with wild cards *
So that even if the selector becomes dynamic it can be handled

Hope this would help you
Cheers @manzar_ali

Thanks for helping me out, I wish to ask you that WaitForReady property is not available in Attach WIndow Activity, what to do in that case so that Attach window finds the element

1 Like

Yah attach window won’t be a problem and we don’t have waitforready property
But that applies for other element accessing activities

Cheers @manzar_ali

Hi @manzar_ali,

I would like to suggest you to use Try Catch block. And if you find that selectors are not matching, then please make the selectors dynamic whether required.

Thanks & Regards,
Apurba

@manzar_ali Besides the aforementioned suggestions, putting wild cards can also be helpful in avoiding selector issues.

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