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

前端 未结 7 1152
一个人的身影
一个人的身影 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 17:14

    I got it to work with Firefox webdriver by the following:

    profile.SetPreference("network.automatic-ntlm-auth.trusted-uris", "google.com");
    driver = new FirefoxDriver(profile);
    
    driver.Navigate().GoToUrl("http://user:pwd@google.com");
    

提交回复
热议问题