WebDriver:SendKeysToElement support for non-typeable form controls (date, color, ...)
Categories
(Remote Protocol :: Marionette, defect, P3)
Tracking
(Not tracked)
People
(Reporter: whimboo, Unassigned)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [webdriver:backlog])
The remote end steps of Element Send Keys requires us to handle specific elements differently. Those steps haven't been added yet. https://w3c.github.io/webdriver/webdriver-spec.html#element-send-keys > 10. Run the substeps of the first matching condition: * element is an input element whose type attribute is File. * The user agent renders element as something other than a text input control (for example an input element in the color state being presented as a colorwheel): * element is content editable
Comment 1•6 years ago
|
||
Similarly there are a few other “HTML5” form controls we need to handle, such as <input type=color>. We already handle <input type=date> and <input type=time> through interaction.setFormControlValue.
Reporter | ||
Comment 2•6 years ago
|
||
Hm, we already have that code in place for content: https://dxr.mozilla.org/mozilla-central/rev/cad9c9573579698c223b4b6cb53ca723cd930ad2/testing/marionette/listener.js#1411 What we should do is clearly to move the call of `setFormControlValue()` to after the interactability checks as being worked on in bug 1414322. Otherwise not sure yet what else is broken.
Updated•6 years ago
|
Updated•6 years ago
|
Updated•1 year ago
|
Updated•10 months ago
|
Reporter | ||
Comment 4•7 months ago
|
||
-
input
elements of typedate
only work when a ISO compatible date like2023-05-03
has been specified. It doesn't work with formats like03.05.2023
. I'm not sure if that is expected or not given that nothing in the WebDriver classic specification actually points out this requirement. But other browsers like Chrome seem to also support other formats. Maybe we have to try to read the date string and convert to ISO internally before setting the value? -
color
and other types of non-typeable form control's are not implemented right now. There is only date and time right now.
Lets discuss in next week's triage meeting in how to prioritize this bug.
Reporter | ||
Comment 5•7 months ago
|
||
It's unfortunate that the value of such input types cannot be set directly, but there is still the workaround by using Execute Script
. Right now we do not have seen that many reports and assume it's not failing that often.
Comment 6•7 months ago
|
||
Thanks for investigating this.
Is it possible to make it as forgiving as possible and not stop operation like element.send_keys() from working without any indication, improper format etc.
Chromium tend to be much more forgiving, and due to deadlines I have no time to investigate much why it fails other places.
So very often I do not have time to make sure it works for firefox/geckodriver if it just works in chromium.
Reporter | ||
Comment 7•7 months ago
|
||
Well, there is a bug for Chromium to make its behavior more strict but that hasn't been fixed yet:
https://bugs.chromium.org/p/chromedriver/issues/detail?id=3274
Also there is https://github.com/w3c/webdriver/issues/1470 which is about a validation check. But there is no decision yet.
Description
•