2016-06-14 66 views
1

任何人都可以幫助我解決與Internet Explorer有關的問題。我無法執行任何類型的操作,例如使用IE驅動程序拖放網頁元素,但這些操作在Chrome和Firefox中完美起作用。我試圖配置Internet Explorer選項,如下圖所示:無法在IE11中使用硒在c#中執行操作#

InternetExplorerOptions options = new InternetExplorerOptions {EnableNativeEvents = false}; 

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

在這個任何幫助表示讚賞,也請讓我知道如果你需要任何其他投入。

我發現這些我們的前端項目使用kendo UI。我認爲這與IE和kendoUI有關,任何解決問題的參考都是值得讚賞的。

回答

1
InternetExplorerOptions options = new InternetExplorerOptions 
      { 
       EnableNativeEvents = true, 
       RequireWindowFocus = true 
      }; 

WebDriver = new InternetExplorerDriver(AppDomain.CurrentDomain.BaseDirectory + ConfigurationManager.AppSettings["IDEServerPath"], options, 
       TimeSpan.FromSeconds(90)); 

設置上述選項實際上解決我的問題

1

您需要下載IEDriver,並給它的路徑承包商

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

我下載了IEDriver和我給使用''路徑'ConfigurationManager.AppSettings [「IDEServerPath」]'''我認爲這不是問題。 – swathi

相關問題