Click activity randomly stops working

Hello,

I am getting this error at random times:
“The element was found but the verification failed because the action did not have the expected outcome”

There are five click activities in my loop and they mostly work but sometimes it would stop at one of the five clicks at random iterations of the loop producing the error message above. Sometimes the error doesn’t even occur at all and the robot will be able to finish the run successfully. It’s hard to reproduce.

Anyone else encounter this error? If so, how were you able to fix it? Does it have anything to do with the robot trying to access Google Chrome that is run as administrator?

Running on Studio 2020.10.15
UiPath.UIAutomation.Activities = 21.10.5
UiPath.System.Activities = 21.10.4

Any advice is much appreciated.

1 Like

Hi,

This error shows there is no element which you set at VerifyExecution.
We might be able to recover to turn on Retry property if click itself failed.
image

Or

To isolate causes, can you try the following?

  • Put 1 or 2 sec delay before Click
  • Set Simulate in InputMethod if it works.

Regards,

1 Like

Hello,

Thanks for the feedback!

However, I did set an element at VerifyExecution and validated it with UI Explorer.
I also have the following property settings:
Retry = True
Wait for page load = Complete
Timeout = 30 seconds
InputMethod = Simulate (though I’ve also tried Window Message and Hardware Event but no luck)

I also tried adding 2 sec delay before Click but the error persists.

Hii @justinv ,
If you are using modern activities, just for the confirmation can you just switch to Classic and use the Classic Click activity (vice versa) and confirm whether you are getting the same error.

Regards,

2 Likes

@justinv

May be it is a interactive site…try with setting page load property to complete…so that the click waits till the page loads. Also check in the selector again for any unique attributes to identify them

Also it is worth changing the verifyexecution element as we see that the click moves to next step without any issue…so that means even when click is not happening the verfiyexecution element is giving true which means that the element is getting detected even when click is failing

Also you can enclose the activity again in a retry scope activity so when the verification fails then it retries and as said if its random it would be wroth retrying using a retry scope

cheers

1 Like

Try to use click with modern activity. Define anchor for click and even fuzzy selector

Thanks for the advice, everyone.

I was originally using modern click activity so I then tried the classic click activity with retry scope to verify the action. Unfortunately, error still occurs so I reverted back to modern. Seems like it has something to do with the page itself where the selectors suddenly become inaccessible.

My workaround for now is, when an error occurs, refresh the page and retry the whole flow again until a set max retry count is reached. Currently testing it. It seems to be working fine for now.

Regards

1 Like