0

我在开始使用 Selenium 时遇到问题。尝试导航到网站时,我必须使用我的公司登录名进行身份验证。 认证窗口

这段代码是我自动验证的尝试。它会导致 404 错误页面。

string url = @"http://DOMAIN\USERNAME:PASSWORD@webpagetest.org";
FirefoxProfile profile = new FirefoxProfile();
profile.SetPreference("network.automatic-ntlm-auth.trusted-uris", "http://webpagetest.org");
FirefoxOptions options = new FirefoxOptions
{
    Profile = profile
};
IWebDriver driver = new FirefoxDriver(options);
driver.Navigate().GoToUrl(url);
4

0 回答 0