1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Don't call #clear on file fields in Selenium, closes #541

This commit is contained in:
Jonas Nicklas 2011-11-15 17:05:18 +01:00
parent ec94dd9d49
commit 9b689a60fc

View file

@ -22,6 +22,10 @@ class Capybara::Selenium::Node < Capybara::Driver::Node
click click
elsif tag_name == 'input' and type == 'checkbox' elsif tag_name == 'input' and type == 'checkbox'
click if value ^ native.attribute('checked').to_s.eql?("true") click if value ^ native.attribute('checked').to_s.eql?("true")
elsif tag_name == 'input' and type == 'file'
resynchronize do
native.send_keys(value.to_s)
end
elsif tag_name == 'textarea' or tag_name == 'input' elsif tag_name == 'textarea' or tag_name == 'input'
resynchronize do resynchronize do
native.clear native.clear