简体   繁体   中英

Is there a native XPath support in Internet Explorer 11?

I have a problem with my Selenium tests when using IEDriverServer.exe (32-bit). The same tests work fine in Firefox and Chrome browsers, but fail in Internet Explorer 11 with diagnostics:

OpenQA.Selenium.InvalidSelectorException : The xpath expression '//input[@id='username']' cannot be evaluated or does notresult in a WebElement

It seems that IEDriver cannot find elements by XPath. IEDriver version: 2.48. Is there any workaround for this problem, except changing XPath with CSS locators?

I found a possible reason in comments for a similar problem: here Update for IE11 KB3025390 (and latest ones) breaks IEDriver. When uninstall updates IEDriver successfully interacts with WebElements through XPath.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM