Skip to content

Commit 84f6d80

Browse files
committed
Add fix for setting color input values
1 parent ff7b308 commit 84f6d80

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/capybara/cuprite/node.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ def set(value, options = {})
104104
when "file"
105105
files = value.respond_to?(:to_ary) ? value.to_ary.map(&:to_s) : value.to_s
106106
command(:select_file, files)
107+
when "color"
108+
node.evaluate("this.setAttribute('value', '#{value}')")
107109
else
108110
command(:set, value.to_s)
109111
end

0 commit comments

Comments
 (0)