ScooterHat
ScooterHat

Reputation: 11

Challenges with rspec testing with Selenium remote webdriver & HTTP Basic auth

Hi Community of wise ones! Any ideas for handling Basic Auth for Selenium 2 (rpec & capybara) when testing with Remote Webdriver? Like for Internet Explorer 9?

What I have tried: I'm not using RackTest. I do use Selenium Grid, and Remote Webdriver. I don't want to use visit "http://user:[email protected]/" as that will not work for IE9 (and the Reg key change to allow it does not work for Win7/IE9).

I've read http://code.google.com/p/selenium/issues/detail?id=34. Lots of specific ideas, but none that I could see supported Remote Webdriver and IE9.

Seems like page.driver.basic_auth(auth_name, auth_pw) is only useful for Rack Test (not me). Seems like selenium.addCustomRequestHeader isn't supported in webdriver 2.

Not crazy about running an external script tool to interact with the browser. (proxy, or AutoIT)

Maybe someday Selenium will support this natively, but until then, what have others found to work?

Upvotes: 0

Views: 679

Answers (1)

ScooterHat
ScooterHat

Reputation: 11

So, unfortunately, the only way I found to deal with this is to avoid it. I chose to create an IP whitelist for the app, so my test machines don't have to deal with Basic Auth.

I would much more prefer that Selenium / Capybara have a way to handle natively.

Upvotes: 1

Related Questions