Reputation: 212
I am trying to get opera to login to a local page that requires a username and password. I have tried the 2 different ways i know
private static String URL = "http://username:[email protected]"; //works with Firefox and Chrome
-using the robot class, works with IE.
but now i am having trouble with getting selenium 2.43.1 to login to the page.
Upvotes: 0
Views: 568
Reputation: 21129
If you are facing Basic authentication issues, try authenticateUsing() method.
The Alert Method, authenticateUsing()
lets you bypass the Http Basic Authentication box.
WebDriverWait wait = new WebDriverWait(driver, 10);
Alert alert = wait.until(ExpectedConditions.alertIsPresent());
alert.authenticateUsing(new UserAndPassword("USERNAME", "PASSWORD"));
Upvotes: 1