Is there any way to check the output (success or failure) in click activity?

Hi All,

I have a few paths stored in an array, I need to loop into all the paths and get the screenshots.
I m using the click activity to click the paths instead of click text since the folder names won’t be completely visible. I am unable to use the text exists activity as well.
So I m relying on the click activity, is there any way to check the output of the click activity.
Because sometimes the folder won’t be available, if the folder is not available, I need to come out of the loop, and read the next path.

Hi @Megha_D_Gowda
Just from the text description, it’s a bit difficult to visualise what you’re dealing with, specifically:

  • Which application are you trying to click?
  • Is it a website or Windows explorer?

To answer your question in general, you could use Try-Catch to keep track of what worked and what didn’t.
Try - Click. If click works, the next step could be setting a Boolean variable True.
e.g. Assign → boolClickWorked = True
Catch - Assign → boolClickWorked = False
In the for loop, outside the try-catch (or in Finally block) you can update count of successful click based on the result.
i.e.
If(boolClickWorked)
Assign → intSuccessfulClicks = intSuccessfulClicks + 1

Hi @Megha_D_Gowda,
By using path exists activity first you can see whether the folder is available or not.
That gives you the boolean output whether the path is present or not.
Basing on that you can use click activity.

Regards,
Aditya

1 Like

its a website

The approach I described in my reply should help you automate a website.
Have you tried the steps suggested earlier?

What problems did you face when trying that?

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