How to create function for catching any warning alert box?

Hi @lovepong66 ,

Please try to use try catch block-Inside try block check any pop up appeared or not if yes then send hotkey enter or close the popup else nothing.
For this we could use element exists or check app state activity.

Thanks