1 Answer

0 votes
by
By using accept() method of Alerts class, we accept Alerts in Protractor.

Note: We have to switch the control to the alert using switchTo().alert() before accepting the alert.

browser.switchTo().alert().accept()

browser.switchTo().alert().accept()
...