I need to use gmail, if network issues happen, i need to handle that exception in my browser. I don’t know how to use exception handling clearly
@Rishabh_Lakhera
Hi, sorry is am not facing any issue, I need to create exception handling with network issue.
So you mean to say,
if for some reason you cant connect to the web while the robot works on a web application you want to perform some actions?
Yes, exactly! Thanks for your understanding my query.
I will try your workflow thanks for that.
In that case lets say you have a workflow where you want to open www.google.com and type into the search bar some value. But while the browser is opening the internet goes down.
What will happen is, you’ll get a SelectorNotFoundException for the typeInto.
So to avoid this, i’d place the type into into a try catch block and set a flag variable to “false” in the try block and to “true” in the catch block and a refresh browser after a delay, and put this whole try block inside a “while”
where the condition will be like flag=true
so what will happen is, when the internet goes down, an exception will be generated,hence the control will go to the catch block where flag will become “true” and we’ll refresh, the while condition will be true and this process will go on!
Although, if while refreshing you get network connection, the page will be loaded and there will be no exception! The value will be typed into, flag will become “false”, and while will be exited!
@Spark_robot,
Let me know if I’m clear
While condition : internetFlag=true
I’m glad you understood that @Spark_robot !
Could you please mark it as a solution so that others can take help from it
Thanks alot!