- Web based alerts
- Windows based alerts
1.Web based alerts are handled by selenium but selenium cannot handle windows based alerts.
2. Selenium uses third party tool to handle windows based alerts.
3. They are Autoit, Sikuli, Robot class.
4. In selenium web-driver the web based alerts are handled by below methods.
- void accept( ) – It clicks on OK button.
- void dismiss( ) – It click on Cancel button.
- String getText( ) – It returns text written on the web alert.
- void sendKeys( )- It sends data into web alert.