How to cancel Alert in Protractor?
Question
How to cancel Alert in Protractor?
Answer
By using dismiss() method of Alerts class, we cancel or close alerts in Protractor.
Note: We have to switch the control to the alert using switchTo().alert() before cancel the alert.
š² Practice Offline on Mobile: Download the free QA Automation & SDET Prep app on Google Play & App Store.