2

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?

Fiddle Freak
  • 1,923
  • 5
  • 43
  • 83

3 Answers3

2

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

Fiddle Freak
  • 1,923
  • 5
  • 43
  • 83
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.

mwalter
  • 1,003
  • 2
  • 13
  • 31
  • Yes, this worked for me. But I also needed to make sure that the Selenium server was started using the same Firefox profile as the add-in was created on. "Default" in my case. I.e.: java -jar selenium-server.jar -firefoxProfileTemplate “”. More info on profiles here: http://girliemangalo.wordpress.com/2009/02/05/creating-firefox-profile-for-your-selenium-rc-tests/ – Toby999 Jan 07 '14 at 19:45
  • "you can configure the plugin in the options menu of Firefox" - I've been searching and cannot find where to configure these options... can you give more detail? – ecoe Apr 30 '14 at 19:28
  • @ecoe Please have a look at the screenshots provided in the plugin description. Just click the link above. – mwalter Apr 30 '14 at 20:18
  • @mwalter I have firefox 29.0 (and so a completey different interface). How do I access it from 29, or is it not yet compatible? – ecoe Apr 30 '14 at 20:26
1

Answer of your question you get from here

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

Ankit jain
  • 4,198
  • 4
  • 19
  • 24