Catch not working

Hi,

I am using try catch block inside for each loop for handling error means if any error in between the execution it will go to next data which is working fine.
But i wanted to write log as if error in between so it will write log which i put in same catch section which is not working.
so how can i achieve that?
why it is not going to catch section for same try catch block?
here is the screenshot.
please help me for the same.

Thanks

@Mathkar_kunal

Instead of Debug, try to run the flow

Also share the exception error you are expecting

Thanks

yes in run mode only i am trying still not going to catch block and no exception.

@Mathkar_kunal

Okay, place all the activities outside of the try catch and run that, If you are expecting a exception then share that exception screenshot

Thanks

ok sure

i am expecting such selector errors.

Get Attribute ‘INPUT d4759781e845’: Cannot find the UI element corresponding to this selector:

@Mathkar_kunal

If you check the exception, there is a exception type as SelectorNotFoundException

So try Catch by giving the same instead of exception and try

Hope this may helps you

Thanks

ok, i will try this and if it work then it will go to next data also right?

@Mathkar_kunal

Yes, It should go after performing the activities you placed in the catch

Thanks

Thanks bro.worked.

1 Like

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