-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need info how to test polymer elements using Selenium. #948
Comments
You can usually access them using the element's 'shadowRoot' object. eg: document.querySelectorAll('my-element')[0].shadowRoot.querySelectorAll('sub-element')[0] I suppose I might have misunderstood your question or Selenium complicates things somehow. If so, perhaps you can give an example of something that doesn't work so we can understand the issues. |
Selenium is a tool used for Automation testing, It finds the locator(attribute tagname) using Xpath or JavascriptExecuter or Csslocator. |
Hrm, thanks for clarifying. In the absence of anyone else commenting, I would say that Selenium needs to be able to do the equivalent of querySelectorAll('html /deep/ my-element'). If you can specify that it use '/deep/' then perhaps there is some hope. |
Chiming in as I've been following selenium/shadowdom support for a while. http://www.w3.org/TR/webdriver/#switching-to-hosted-shadow-doms but unless i missed something, progress has not moved from what i've seen On Thu, Nov 20, 2014 at 1:02 PM, Max Waterman [email protected]
|
wrt to my mention of /deep/ - it was mentioned on the polymer panel at the chrome dev summit today. There seemed to be a, dare I say it, /negative/ feeling towards that - and also the shadowRoot property - and that they should try to find some other way to avoid this kind of 'violation' of the encapsulation. Though there was a comment that it was more because implementing /deep/ and shadowRoot was actually difficult in terms of achieving good performance. |
Hmm.. Thanks for the reply. |
I might be late, very late.
I can see that the UI is properly automated! |
Any updates on this? |
Hi |
Hi All,
I have used polymer elements in my project, but when I was automating it using Selenium I feel I was not able to access Shadow Dom objects.
Is there any other alternative to access Shadow DOM objects?
The text was updated successfully, but these errors were encountered: