Unexpected Popup Window

Hi Team,

While bot is opening a browser an unexpected popup window appears how to close it.

  1. Its a rare occurrence
  2. Unable to replicate that pop up window with multiple scenarios
  3. Whenever this popup comes bot unable to proceed further

How to handle this scenario ?

you can create a generic selector that closes the oup-up window. You might need few popups to generate this generic selectors.

the you can use a global Exception handler that will have that generic selector in element exists and click activity in it to check if there is a poup and if yes, it will close it and retry the failed selector.

How to create a generic selector and can i need to use global exception handler for that specific xaml right ?
Do you have any sample code for this?

you will need at least 3-4 pop-ups to create that generic one, it depends on your application.

you can have one global exception handler workflow that will take care for entire project

This video shows thw working with easy explanation:
Global Exception Handler

Hi @Robotics ,

Is this the Popup you were referring to?


If so, then this usually popsup when you use the Taskkill Activity

Here is the selector for it(Edge)

<wnd app='msedge.exe' cls='Chrome_WidgetWin_1' title='Restore pages' />
<ctrl name='Restore pages' role='dialog' />
<ctrl name='Microsoft Edge closed unexpectedly.' role='text' />

Kind Regards,
Ashwin A.K

Hi @Robotics ,

You can close that pop-up using the global exception handler xaml and make it to continue.
Or you can use parallel activity to achive if any particular xaml alone


Let me elaborate further.
While launching a application bot was asking to choose the respective browser. Even though the default browser selected as MS edge we are getting this unexpected popup sometimes hence leading to system exception
Popup window is
How do you want to open the file?
Microsoft Edge
Other Options

Adobe Acrobat
Google Chrome
Internet Explorer

Hi @Robotics,
Kindly share the screenshot of the error.


This is the pop up I am getting

Hi @Robotics ,
How you are trying to open the web browser, which activity are you using?