Is there a way to check if an activity was completed successfully, from within the process?

Hi Everyone,

I have a scenario. Lets say my process has 3 activities.
First activity is a click, second is a Type Into, third is a click.
Now my requirement is that only if a value is typed into the field by the second activity, I need to proceed to the click activity.

In other words, after the Type Into activity, I need to have some kind of a check that says “Yes. The ‘Type Into’ activity is successful. You can proceed to the next activity”

Is there away to accomplish this except by using a Try-Catch ?

Thanks
Jegan

1 Like

Hi @Yhtravarkkhc_Nagej

I would scrap the field to see what is typed into it :slight_smile: If it doesn’t match with your input, throw an exception and retry :slight_smile:

1 Like

yah it is possible with TRY CATCH
while keep the whole process in TRY block of try catch activity and if any exception occur it will go to CATCH block where we can have a log message stating that
"error occured at : "+exception.source

Fine
–while in the TRY block use
–a click activity
–a type into activity
–a assign activity with a boolean variable like this
bool_success = True
–now use a IF activity
with condition like this
bool_success = True
if true it will go to THEN part where we can put the CLICK activity only then it would click right

simple isnt it
hope this would help you
Cheers @Yhtravarkkhc_Nagej

Well, is there a way to make it generic? I mean a single check that would work for any activity. Even a delay or a write line. Not just the Type Into activity.

Sorry Palaniyappan, I do not want to use a try catch. I want an alternative solution if it is available.

1 Like

I did something similar once for some app I was automating and I would have different check per field.

Thus, for text fields, I would Get Text and compare with my input. For radio buttons, I would Get Attribute after setting it and see if it matches my desired input.

Basically, you will need to develop checks for each situation if you want to be sure of your input.

no worries
then we can implement these steps alone

Cheers @Yhtravarkkhc_Nagej