Skip to content
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

iron-input value not retrievable outside of Polymer #95

Open
beta-vulgaris opened this issue Dec 21, 2016 · 2 comments
Open

iron-input value not retrievable outside of Polymer #95

beta-vulgaris opened this issue Dec 21, 2016 · 2 comments

Comments

@beta-vulgaris
Copy link

beta-vulgaris commented Dec 21, 2016

I'm writing selenium tests for a page built with Polymer.
I encountered the issue that selenium is not able to read the value of neither paper-input nor iron-input. An xpath expression like //paper-input[@value="test"] fails to find the element. Also within web developer tools the value cannot be seen nor found in the dom tree.

My workaround is to add a html attribute "valuetesting" to paper-input/iron-input, which is bound to the value and which is visible in the dom tree (valuetesting$="{{myval}}") of paper-input/iron-input.
However, I think by default the value should be retrievable outside of Polymer. I would suggest to set the html tag "value" on the "input" element. Do you agree?

@notwaldorf
Copy link
Contributor

I'm not sure I understand -- the input is in the shadow DOM, and should not be accessible outside of the shadow root. Secondly, native input elements already have a value attribute, which is bound to the iron-input's bind-value property, and paper-input's value.

@beta-vulgaris
Copy link
Author

Maybe it's a bit easier to illustrate it this way...:
http://output.jsbin.com/qupucesewa

I declare value=... as well as valuetesting$=...
However, only valuetesting is accessible through xpath.

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

No branches or pull requests

2 participants