HTML5 specialized text fields not recognized as text fields
See original GitHub issueHTML5 introduced several new input types, several of which are specialized text inputs including email, number, url, search, and tel. These input types are not recognized by Page Should Contain Textfield
, Page Should Not Contain Textfield
, Textfield Should Contain
, or Textfield Value Should Be
.
The cause is that these keywords use the constraint ‘text field’ and ElementFinder will filter out any input elements that do not have type ‘text’. Since these inputs are still text inputs, they should be treated as such. The number type may render a spinbox control in some browsers, but still behaves like a text-type input.
Here is a test that should pass, but fails with: Value of text field ‘name=email’ should have been ‘selenium@xxx.yyy’ but was ‘None’
Open Browser http://www.the-art-of-web.com/html/html5-form-validation/ gc
Input Text name=email selenium@xxx.yyy
Textfield Value Should Be name=email selenium@xxx.yyy
With minor modifications to elementfinder, I was able to get the above to pass.
This is being entered as a result of this: http://stackoverflow.com/questions/34169390/how-to-find-value-of-email-field-using-selenium2library
Issue Analytics
- State:
- Created 8 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top GitHub Comments
Same here. Here is my workaround:
I am also getting this error with a field that has
<input type="tel" inputmode="numeric">
attributes. This is my workaround:It would be good to get this issue fixed so that the workaround isn’t necessary.