enter image description here

How to enter credentials using Selenium (Java)? I am not able to enter credentials in the Pop-up window, which is shown above. Please help me in this. Thanks in Advance


This is common known problem. Solution that I've implement in my automation test is simple: to open page without basic http authorization You must use url with template: login:password@site. For example:

page: xyz.com login: admin password: adminpassword

url: admin:adminpassword@xyz.com

  • yes, i have already tried this, but it not works for me
    – surya
    Sep 14 '15 at 13:06
  • And also it throws me "The address wasn't understood" exception
    – surya
    Sep 14 '15 at 13:12
  • this format is not accepted in IE. Which browser are you using? Sep 15 '15 at 9:40
  • Firefox has protection against phishing, so with username:password@serveraddress:portnumber/webname the very first login should be made manually. If someone knows how to disable it, please make the answer bellow. Additionally, the dialog is appearing before selenium get's the control over the window and therefore it is not possible to reach it as an popup.
    – Dee
    Sep 15 '15 at 11:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.