Click activity cannot find UI element

I am using a Click activity to click on a name on a web page during a data scrape that uses names from a Datatable. But whenever the searched name does not appear, the activity throws an error, stopping the automation. I would like to know if there is any way to create something like:
If UI element is not found THEN go to next name in Datatable.
I managed to bypass the error part with the click but later on in the automation it throws an error due to not having any information to extract, so I figured a solution with the click activity would be best and perhaps the most simple (not for me).
Thank you

Hi @Robert_Wennberg
Kindly try setting the ContinueOnError field of your click activity to TRUE


Thank you for the quick response.
I did do that and tried running the automation, but the problem persists because of another error appearing later on in the automation.
The automation expects to have extracted data after the “Click” activity, and if it continues without that information it will throw an error later on a “Read range” and “Write range” activity.
Since I am using a For Each Row, I was thinking something along the lines of the For Each Row activity to restart (go to the next name in the datatable) every time the “Click” activity throws an error.

Hope that explained my issue a bit further!
Thank you

Inside your for each row, add a Continue activity if the Click activity returns an error. This will ensure that the current iteration of the for loop is skipped and will now proceed to the next name.

1 Like


I just added a Continue activity combined with an IF statement, checking if the Element Exists = True Then Click the Element. Else “Continue” and it’s working perfectly.
Thank you for your help!

@Robert_Wennberg Glad i could help!

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