How to handle UnhandledAlertException in selenium

How to handle UnhandledAlertException in selenium webdriver explains issues facing with new geckodriver versions to open Firefox Browser and issues with Alerts.In this  UnhandledAlertException in selenium lesson,you'll get clear idea to resolve the issues in selenium test scripts.

Trending Posts:



Resolution:

Please watch below video for clear explanation with example.




You'can use below code to handle Alert Exception instead of AutoIT script.

Alert alert = switch().to.alert();
alert.sendKeys(username+Keys.TAB.toString()+Password);
alert.accept();

The above script can be useful to handle proxy Authentication in Firefox Browser and
it'll not work in Google Chrome.

No comments:

Post a Comment