Hi all,
I am really struggling with this for a while.
I have an angular app which throws a confirmation window/alert whenever a reload or navigation change happens. (onbeforereload basically)
Problem is, all the existing end to end protractor tests are failing now as each one has a before each get index.html page and is not expecting an alert.
I have tried what many suggested to get the alert and accept with the following:
alertDialog = browser.switchTo().alert();
alertDialog.accept();
But it doesn't work. I can't get to the window alert because is failing on the the get page.
Whenever I do a 'browser.get('index.html');'
an 'UnexpectedAlertOpenError: unexpected alert open' is thrown
Any help will be much appreciated