【问题标题】:How to programmatically turn off IE's Protected Mode?如何以编程方式关闭 IE 保护模式?
【发布时间】:2015-10-06 17:36:58
【问题描述】:

我是 C# 的新手,我正在使用 Selenium Webdriver 创建一个自动化工具。我想使用 c# 以编程方式更改 IE 中的保护模式设置。

任何人都可以根据您的建议帮助我吗?

也可以通过编程方式更新注册表来实现这一点。

【问题讨论】:

    标签: c# asp.net selenium registry


    【解决方案1】:
        var options = new InternetExplorerOptions
            {
                IntroduceInstabilityByIgnoringProtectedModeSettings = true
            };
    
           driver = new InternetExplorerDriver(path to the driver.exe", options)
            {
                /*
                 * open the supplied URL on the opened instance of the browser
                */
                Url = "your url to open"
            };
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-08-20
      • 1970-01-01
      • 2016-02-20
      • 2015-10-20
      • 1970-01-01
      • 2011-04-17
      • 2011-01-30
      • 1970-01-01
      相关资源
      最近更新 更多