Login
Remember
Register
Ask a Question
How to accept Alert in Protractor?
0
votes
asked
Apr 5, 2021
in
Protractor
by
Robindeniel
How to accept Alert in Protractor?
alert
protractor
protractor-interview-questions
protractor-advanced-questions
protractor-interview-questions-answers
protractor-automation-interview-questions
protractor-scenario-interview-questions
protractor-mcq-questions
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Apr 5, 2021
by
Robindeniel
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()
...