0

I am using python to write selenium-rc test code for my server code. The server application is written with ASP.NET and is configured with "Windows authentication". The execution steps of my python code look like the following:

  1. Start python main()
  2. Create the selenium instance (say sel)
  3. Start the selenium by calling sel.start()
  4. Open the target URL with the selenium instance via calling sel.open(url)
  5. Windows authentication dialog box pops up at this time
  6. sel.open(url) is, by default, set to time out in 30 seconds while the authentication process is pending for input of username and password.

  7. At this point, I could not find any way through selenium-rc interface to make it recognize the pop up dialog box. I google around and find out that the selenium-rc interface (in python) is for http authentication only- not Windows authentication.

I have tried to use autoit within selenium but still without luck.

Can any of you shed some light on this?

Thanks in advance.

marvinchen

2 Answers 2

1

Selenium has issues recognizing that window (try to search HTTP Basic Authentification for more details about it)

Basically, only thing which kinda works is to put username and password into URL request itself. Assuming your application runs on http://example.com the new url should look like this:

 http://username:[email protected]

This solution works for me, but only using Google Chrome as a default browser for testing

Sign up to request clarification or add additional context in comments.

1 Comment

Worked for me on Firefox, with a Linux-based server asking for authentication (on Windows).
0

There is now way you can sort it out easy and at this point unless I have missed something last few months it will only be FireFox who can fix this for you.

Read this blog how to sort it out: http://applicationtestingtips.wordpress.com/2009/12/21/seleniumrc-handle-windows-authentication-firefox/

Comments

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.