Try catch inside Excel loop for drop down value

Hi,

i have a web element configured(Drop-down field). i am trying to populate the values from excel to that drop down field with the help of excel loop. When invalid value is passed, BOT throws error it not a valid option and the BOT stops here and does not move to the next record in the excel. I tried using Try catch block to catch the exception if any. Now the BOT moves to next record but always goes to Catch block. Tried using Break loop tool inside catch but even that doesnt help. Please suggest a way out.

Regards,
Priya

@priyadharshini_ss

Can you share screen of Try and Catch

Thanks

image
image

image - Final value written in excel post successful test run

Hi,

In catch or in final block reassign value of excel loop argument to empty string

Regards,
Amit Anand

@priyadharshini_ss

Check the activities placed in Try block try placing out side of the TryCatch Block and check

I hope those are failing thats the reason it is executing Catch

Hope this helps you

Thanks

is there any way we can use the value of ignore error property. I set the value for this property to true at that time its executing the next record correctly. if i set this to “yes” it executing the next step in the process. i need the BOT to skip if error occurs and move to next record. So i am wondering if there is any was the value of that property to check if error occured i can ask the BOT to move to next record instead of proceeding till end.

note: tried Break Loop tool. But thats ending the BOT instead of coming out of that loop. My activities placed in try doenst have any problem when correct value are passed.

Eg, When i pass the country value as ABCD, am facing this issue. If correct values say India is passed tat time BOT is behavig as per my requirement. The issue occurs from the row which has invalid value. after that record any valid rows also written with “errr”

1 Like

@priyadharshini_ss

Did you check the value is changing as per your requirement?

After looking your note the value is becomes constants I believe

Thanks