Skip to content

Commit

Permalink
Fix bot.dom.isEditable with more input element types
Browse files Browse the repository at this point in the history
Some input element types that are considered editable by W3C WebDriver
Recommendation were not allowed by bot.dom.isEditable. Those missing
types are now added. See https://www.w3.org/TR/webdriver1/#dfn-editable.
  • Loading branch information
JohnChen0 authored and barancev committed Sep 30, 2018
1 parent d47851c commit 0ca0810
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion javascript/atoms/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,13 @@ bot.dom.isContentEditable = function(element) {
bot.dom.isEditable = function(element) {
return (bot.dom.isTextual(element) ||
bot.dom.isFileInput(element) ||
bot.dom.isInputType(element, 'range')) &&
bot.dom.isInputType(element, 'range') ||
bot.dom.isInputType(element, 'date') ||
bot.dom.isInputType(element, 'month') ||
bot.dom.isInputType(element, 'week') ||
bot.dom.isInputType(element, 'time') ||
bot.dom.isInputType(element, 'datetime-local') ||
bot.dom.isInputType(element, 'color')) &&
!bot.dom.getProperty(element, 'readOnly');
};

Expand Down

0 comments on commit 0ca0810

Please sign in to comment.