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 ?
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
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.
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.