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 f4360f6099
commit c32f9a95f5
1 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,10 @@ class Capybara::Selenium::Node < Capybara::Driver::Node
click
elsif tag_name == 'input' and type == 'checkbox'
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'
resynchronize do
native.clear