0

I am currently automating tests with Selenium/C#/SpecFlow.

In our application we are experiencing some unexpected and expected alerts. Now these alerts are not crucial and non-blocking for any of our tests. These are known environment issues.

What I want to achieve is, throughout every test, I want Selenium to accept any alert at any point. Is there a way to define this at the beginning of the test so whenever there is an alert, it gets accepted?

Thanks in advance! Anand

Code Rocker
  • 500
  • 4
  • 15
Anand
  • 1,899
  • 1
  • 13
  • 23
  • Try checking the desired capability of Selenium , you may be able to set the Accept the Alert as true. Worth checking it. – Arpan Buch Sep 26 '16 at 12:09
  • 1
    What have you tried so far? Perhaps setting the desired capabilities for your `WebDriver` will help. Take a look at [this](http://stackoverflow.com/questions/26772793/org-openqa-selenium-unhandledalertexception-unexpected-alert-open) post. – JDelorean Sep 26 '16 at 13:13

0 Answers0