How to perform Basic Authentication for FirefoxDriver, ChromeDriver and IEdriver in Selenium WebDriver?

前端 未结 7 1167
一个人的身影
一个人的身影 2020-11-27 16:46

I am using the Selenium-Firefox-driver and Selenium-Chrome-Driver version 2.0a5 (Web Driver API), and I am trying to test a web app that h

7条回答
  •  南笙
    南笙 (楼主)
    2020-11-27 16:57

    There is a solution for performing authentication with Selenium 1.x by manually setting the HTTP headers at http://mogotest.com/blog/2010/06/23/how-to-perform-basic-auth-in-selenium but I don't think this is transferable to Selenium 2, as you don't have access to the headers.

    According to the information here 'Basic Authentication support for Selenium 2' was added in Selenium 2 Beta 2 but looking through the source code I can only see it implemented as a way of securing Remote Selenium Servers against anonymous access.

    So I think the answer is that BASIC HTTP authentication is not currently supported.

提交回复
热议问题