How to automate username/password fill for firefox authentication popup using selenium IDE

核能气质少年 提交于 2019-12-18 09:14:20

问题


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



来源:https://stackoverflow.com/questions/16023869/how-to-automate-username-password-fill-for-firefox-authentication-popup-using-se

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!