I know how to handle alerts but when they come unexpectedly then I am not able to handle them and my script failed. When these alert comes, there is no exception and script keeps on running in background without performing any action. I want handle any unexpected alert thrown by application when my script is running.
I will be very thankful if you share your ways to handle an unexpected alert.