Best Answer · By JanBask QA Expert
Answered on Nov 13, 2019
To deal with Web-based alerts or popups, we have to change to the ready window and call Selenium WebDriver Alert Programming interface strategies.
dismiss(): To tap on the Cancel button.
accept(): To Tap on the Ok button.
getText(): To get the content which is available on the alert.
sendKeys(): To enter the content into the alert box.