【问题标题】:Selenium WebDriver with IE11: Exception has been thrown by the target of an invocation带有 IE11 的 Selenium WebDriver:调用的目标已抛出异常
【发布时间】:2015-03-26 16:00:05
【问题描述】:

IE9 时一切正常。我升级到 IE11,一切都开始了。

我的代码在驱动程序初始化时失败 (TargetInvocationException)

Type[] types = { typeof(InternetExplorerDriver), typeof(ChromeDriver) };
foreach (Type t in types) {
   driver = (IWebDriver)Activator.CreateInstance(t); //Throws exception in title
...

在WIN7上。 I have the registry update as described.

我发现的大多数地方都通过了这一步,并且在使用 webdriver 时遇到了异常。我还没到……

【问题讨论】:

    标签: c# selenium selenium-webdriver internet-explorer-11


    【解决方案1】:

    显然,在途中错过了另一个更新。从 IE9 升级到 IE11 时,这一行(来自 OP 中的链接)很重要:

    此外,IE 10 及更高版本必须禁用“增强保护模式”。 此选项位于 Internet 选项对话框的高级选项卡中。

    不要跳过!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多