diff options
Diffstat (limited to 'testing/marionette/listener.js')
-rw-r--r-- | testing/marionette/listener.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testing/marionette/listener.js b/testing/marionette/listener.js index b64eb378df..619ac249d1 100644 --- a/testing/marionette/listener.js +++ b/testing/marionette/listener.js @@ -30,6 +30,7 @@ Cu.import("chrome://marionette/content/session.js"); Cu.import("chrome://marionette/content/simpletest.js"); Cu.import("resource://gre/modules/FileUtils.jsm"); +Cu.import("resource://gre/modules/Preferences.jsm"); Cu.import("resource://gre/modules/Task.jsm"); Cu.import("resource://gre/modules/XPCOMUtils.jsm"); @@ -1465,6 +1466,9 @@ function* sendKeysToElement(id, val) { if (el.type == "file") { let path = val.join(""); yield interaction.uploadFile(el, path); + } else if ((el.type == "date" || el.type == "time") && + Preferences.get("dom.forms.datetime")) { + yield interaction.setFormControlValue(el, val); } else { yield interaction.sendKeysToElement( el, val, false, capabilities.get("moz:accessibilityChecks")); |