1

I am trying to test a web app that has BASIC authentication (there is a popup that comes up to authenticate the user when I hit whatever page, the popup is not part of the HTML). After entering the username/password and clicking OK on the popup the main login page appears.

Now, I need to a strategy to authenticate the user in Firefox on the popup. I tried the following looking at some old atricles in the Stack Overflow and this is not working for me.

Can some please guide me how to proceed? I have Selenium 2.5.0 installed and using python for scripting.

profile = webdriver.FirefoxProfile()
profile.set_preference("network.automatic-ntlm-auth.trusted-uris", "website url")
driver = webdriver.Firefox(firefox_profile=profile)
driver.get("http://username:password@WebsiteURL")

1 Answer 1

0

To get this user:password scheme working you need to set another preference:

profile.setPreference("network.http.phishy-userpass-length", 255);

Reference

Btw, you are using very old version of Selenium.

1
  • Hello Erki.. I have tried the avbove too and it didn't work for some reason. Commented Sep 10, 2014 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.