Internet explorer Internet Explorer的默认用户配置文件在哪里?如何从Selenium访问它?
每次运行测试时,我都会得到一个新的IE实例,它完全忽略了我的所有设置。我在Firefox和Chrome中解决了同样的问题,方法是为这些浏览器设置选项来查找特定的用户配置文件Internet explorer Internet Explorer的默认用户配置文件在哪里?如何从Selenium访问它?,internet-explorer,selenium,Internet Explorer,Selenium,每次运行测试时,我都会得到一个新的IE实例,它完全忽略了我的所有设置。我在Firefox和Chrome中解决了同样的问题,方法是为这些浏览器设置选项来查找特定的用户配置文件 FirefoxProfile profile = new FirefoxProfile(path/to/profile"); public static readonly IWebDriver WebDriver = new FirefoxDriver(profile); 这就是Firefox中用户配置文件的路径: @"C
FirefoxProfile profile = new FirefoxProfile(path/to/profile");
public static readonly IWebDriver WebDriver = new FirefoxDriver(profile);
这就是Firefox中用户配置文件的路径:
@"C:\Users\<user_name>\AppData\Roaming\Mozilla\Firefox\Profiles\t1hjw29h.WatirWebDriver"
@“C:\Users\\AppData\Roaming\Mozilla\Firefox\Profiles\t1hjw29h.WatirWebDriver”
我想知道用户档案位于Internet Explorer的哪个文件夹,以及如何从Selenium访问它
感谢您的帮助在与这个问题纠缠了几天之后,我终于找到了一个帮助我解决这个问题的方法,至少在使用Internet Explorer时是这样。我仍然在寻找一个合适的Chrome解决方案
public virtual void Open(
string urlParam = "")
{
driver.Navigate().GoToUrl(ExpectedPageUrl.Replace("{0}", urlParam));
Process.Start("path to my AutoIT executable file\BasicAuth.exe");
Wait(3);
}
我的AutoIT可执行文件名为BasicAuth.exe。现在它工作得很好,也就是说,我能够在需要凭据的页面上运行测试