【问题标题】:Unable to perform actions in IE11 with selenium in c#无法在 IE11 中使用 c# 中的 selenium 执行操作
【发布时间】:2016-06-14 02:44:15
【问题描述】:

谁能帮我解决与 Internet Explorer 相关的问题。我无法执行任何类型的操作,例如使用 IE 驱动程序拖放 Web 元素,但这些操作在 chrome 和 firefox 中完美运行。我尝试配置 Internet Explorer 选项,如下所示:

 InternetExplorerOptions options = new InternetExplorerOptions {EnableNativeEvents = false};

 WebDriver driver = new InternetExplorerDriver(ConfigurationManager.AppSettings["IDEServerPath"], options, TimeSpan.FromMinutes(2));

对此的任何帮助表示赞赏,如果您需要任何其他输入,请告诉我。

我发现这些我们的前端项目使用了剑道 UI。我认为这与 IE 和 kendoUI 有关,任何解决问题的参考都表示赞赏。

【问题讨论】:

    标签: c# internet-explorer selenium selenium-webdriver kendo-ui


    【解决方案1】:

    您需要下载IEDriver并将其路径提供给承包商

    WebDriver driver = new InternetExplorerDriver("c:\driver", options, TimeSpan.FromSeconds(60));
    

    【讨论】:

    • 我下载了 IEDriver,并使用 ConfigurationManager.AppSettings["IDEServerPath"] 提供了路径。我认为这不是问题。
    【解决方案2】:
    InternetExplorerOptions options = new InternetExplorerOptions
               {
                  EnableNativeEvents = true,
                  RequireWindowFocus = true
               };
    
    WebDriver = new InternetExplorerDriver(AppDomain.CurrentDomain.BaseDirectory + ConfigurationManager.AppSettings["IDEServerPath"], options,
                  TimeSpan.FromSeconds(90));
    

    设置上述选项实际上解决了我的问题

    【讨论】:

      猜你喜欢
      • 2017-01-15
      • 1970-01-01
      • 1970-01-01
      • 2020-08-21
      • 1970-01-01
      • 2023-03-22
      • 1970-01-01
      • 1970-01-01
      • 2014-08-22
      相关资源
      最近更新 更多