1 Answer

0 votes
by (19.9k points)
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()

Related questions

...