Internet explorer Internet Explorer的默认用户配置文件在哪里?如何从Selenium访问它?

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

每次运行测试时,我都会得到一个新的IE实例,它完全忽略了我的所有设置。我在FirefoxChrome中解决了同样的问题,方法是为这些浏览器设置选项来查找特定的用户配置文件

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解决方案

  • 一个需要下载,因为它在视频中说
  • 编写一个AutoIT脚本,保存它,然后编译它以生成一个可执行文件,如视频所示
  • 添加命令以在自动化上下文中执行AutoIT
  • 最后一步是最关键的。在我的例子中,我使用了Open方法,因为当我打开一个页面时,我会得到一个验证弹出窗口的提示

       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。现在它工作得很好,也就是说,我能够在需要凭据的页面上运行测试