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:
parent
ec94dd9d49
commit
9b689a60fc
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue