Try-catch not working for DialogBox

Hi i am facing some issue in try catch as it is not able to detect error.

Situation → On the webpage i am entering data and click save. The record saved when no error in data but throws error (Show a dialog box) when data is corrupt.

Steps i tried - > Basically put the save in the try and dialog handler in catch but not working.
it is not going to catch block as save is clicked.

I tested dialog handler separately working fine so how to have dialog handler on specific events means when they appear.


You need to throw exception using Throw block when a corrupt data is encountered.


Hi ,
Thanks for your reply.
The case is it will throw error in try catch when the required web element not found.

But in my application , the web element exists but a pop up comes up.
The bot is able to click behind the pop up and proceed.
We need to stop bot.
Can you provide help on this?

Hi ,

You can put condition on pop up to exisit or any control inside pop up to exist and throw a exception using Throw activity in case condition is true