I have a scenario where I am testing a Windows based application using WinAppDriver and Selenium TestNG framework. While testing the application, it may throw random alerts/pop-ups/error messages at any point of time. I would like to handle that in my code and close that alert/pop-up/error message and carry on with my automation testing.
Any suggestions?