Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

Webcomponents.js breaks Selenium WebDriver for .Net in IE11 #504

Closed
warpech opened this issue Mar 8, 2016 · 3 comments
Closed

Webcomponents.js breaks Selenium WebDriver for .Net in IE11 #504

warpech opened this issue Mar 8, 2016 · 3 comments

Comments

@warpech
Copy link

warpech commented Mar 8, 2016

If webcomponents.js polyfill is loaded on the page, Selenium WebDriver for .Net in IE11 does not find any element on the page.

For example, the following test:

IWebElement element = wait.Until(driver => driver.FindElement(By.XPath("(//h1)[1]")));

Fails with error:

Test Name:  Polyfill_BodyElementExists
Test FullName:  SeleniumTests.MarcinNunit("internet explorer").Polyfill_BodyElementExists
Test Source:    C:\www\warpech\SeleniumTest\UnitTest1.cs : line 78
Test Outcome:   Failed
Test Duration:  0:00:18.645

Result StackTrace:  
at OpenQA.Selenium.Support.UI.DefaultWait`1.ThrowTimeoutException(String exceptionMessage, Exception lastException)
at OpenQA.Selenium.Support.UI.DefaultWait`1.Until[TResult](Func`2 condition)
at SeleniumTests.MarcinNunit.Polyfill_BodyElementExists() in C:\www\warpech\SeleniumTest\UnitTest1.cs:line 83
--NoSuchElementException
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(String mechanism, String value)
at OpenQA.Selenium.Remote.RemoteWebDriver.FindElementByXPath(String xpath)
at OpenQA.Selenium.By.<>c__DisplayClasse.<XPath>b__c(ISearchContext context)
at OpenQA.Selenium.By.FindElement(ISearchContext context)
at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(By by)
at SeleniumTests.MarcinNunit.<>c.<Polyfill_BodyElementExists>b__10_0(IWebDriver driver) in C:\www\warpech\SeleniumTest\UnitTest1.cs:line 83
at OpenQA.Selenium.Support.UI.DefaultWait`1.Until[TResult](Func`2 condition)
Result Message: 
OpenQA.Selenium.WebDriverTimeoutException : Timed out after 10 seconds
  ----> OpenQA.Selenium.NoSuchElementException : Unable to find element with xpath == (//h1)[1]

It is not limited to By.XPath. The same problem exists with By.CssSelector.

I have created a test project to recreate the issue: https://github.com/warpech/SeleniumTest

The test tries Firefox and IE11 driver. Only IE11 fails on this.

My environment is Windows 10 64-bit, using Selenium for .Net.

Versions used: NUnit 2.6.4, NUnitTestAdapter 2.0.0, Selenium.Support 2.52.0, Selenium.WebDriver 2.52.0, WebDriver.IEDriverServer.win64 2.44, WebComponents.js 0.7.21

2016-03-08 18_52_20-seleniumtest - microsoft visual studio

Help or workaround appreciated!

@warpech
Copy link
Author

warpech commented Mar 8, 2016

Also reported in SeleniumHQ/selenium#1765, since I am not sure if this is WebComponents.js issue or Selenium issue.

@warpech
Copy link
Author

warpech commented Mar 9, 2016

Same problem with Selenium IEDriverServer 2.51.1 as well as Selenium Standalone Server 2.52

@TimvdLippe
Copy link
Contributor

Thanks for the issue. It has been a great while since this issue was opened. Sadly, this issue misses a live reproduction with the most recent version of the webcomponents polyfill for us to be able to debug and potentially fix. Versions 1 of the polyfills fix a large amount of issues, probably including this one as well.

Please see the CONTRIBUTING.md for guidelines on filing issues. You can start from this jsBin template as a starting point and link it in the issue template under "Live Demo".

Feel free to file a new issue following these instructions if you can still reproduce this issue with versions 1 of the polyfills. Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants