Add the username and password in the Url , Without prompting the dailogbox it will open the site.
For Example : If you want to access the site HTTP://WWW.testsite.com which will ask the user credentials to access the site then modify URL as a HTTP://username:Password@ WWW.testsite.com
FirefoxProfile profile = new FirefoxProfile();
driver = new FirefoxDriver(profile);
driver.get("http://username:password@www.test.com/");
No comments:
Post a Comment