Is it possible to detect a .NET Framework error?


Is it possible to detect .NET Framework exception like in screenshot and then click on Quit button?
Which library should we use?
It’d be grea if you can write its code snippet.




I haven’t replicated the behaviour nor tested it yet, but I believe you can use RPA.Windows library to detect such dialog, even get the text from it if possible, then based on the message deciding what button to press next. (or not seeing the dialog at all after a certain timeout and just continuing with the robot logic)

A few keywords of interest:

  • Control Window using a locator like Microsoft .NET Framework
  • Get Text over the returned element above (if it doesn’t raise in the absence of the window)
  • Click on the button with names like Continue or Quit
  • Run Keyword And Ignore Error used with Control Window so you except the raised error (if the window isn’t found)
  • Print Tree which prints a tree of elements starting from Desktop or other root window so you can craft better locators

Other useful articles on identifying locators:

Good luck and let us know what was your solution!


Thanks a lot! I will try this out.