Search code examples
javascriptangularjsangularjs-e2eangular-scenario

Angularjs e2e testing with scenario test runner - ignore alert()


I'm creating the e2e test for my application and I have a problem when I'm testing the login page. I want to test both the correct login and the incorrect one but the problem is that when you enter incorrect credentials you get an alert("Your email or password is incorrect") and that also gets triggered in the e2e test which means I have to click the "OK" button on the alert() in order to continue the test. Is there anyway to ignore the alert() in the test ?


Solution

  • Please take a look at https://github.com/katranci/Angular-E2E-Window-Dialog-Commands

    You can add alertOK(); in your test, before the alert will be shown and this let you skipped it.