user11766050
user11766050

Reputation: 19

Pop-up window need to give password

When i open website there pop-up window asking password(admin) and without user name so how handle the pop-up authentication window by using selenium java and I was used Firefox driver.

My requirement is without user name and only enter the password as admin type need to handle the pop-up window

Upvotes: 0

Views: 154

Answers (1)

Dmitri T
Dmitri T

Reputation: 167992

If your application is protected by basic access control you should be able to bypass it by simply providing your credentials as a part of the URL string:

driver.get("http://your-username:[email protected]");

More information:

For more complex authentication schemes like NTLM or Kerberos you will need to construct proper Authorization header and add it to your request via i.e. BrowserMob Proxy. Check out Handling Authentication Requests with Selenium - Prologue article for more information on implementing this if needed.

Upvotes: 1

Related Questions