How to automate username/password fill for firefox

2020-02-15 02:06发布

问题:

I got a selenium script that works, but when it is opened with selenium-rc it is in a new instanced which requires me to re-login. Is there a way to automate filling in the username/password for the "authentication required" window that pops up?

I have tried the following but it doesn't work:

http://username:password@site.com/ instead of http://site.com/

Any ideas other than calling another script like autohotkey?

回答1:

I ended up using AutoIT with a login script containing the following and it worked:

WinWaitActive("Authentication Required")

Send("Username")

Send("{TAB}")

Send("Password")

Send("{ENTER}")

Support information for Firefox environment setup was found here:

http://www.passionatetester.com/2010/03/how-to-handle-windows-authentication.html



回答2:

You could give the Firefox plugin Integrated Authentication for Firefox a try. After installing you can configure the plugin in the options menu of Firefox. Just add your site.com to the integrated authentication enabled sites and see whether it works for you. In my case it solved the problem.



回答3:

Answer of your question you get from here

you have to create FF profile for selenium RC, you can create profile from here