mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Emulate user input to prevent onchange from being triggered twice in Selenium driver
This commit is contained in:
parent
ae8de68308
commit
6dc095b3fa
1 changed files with 1 additions and 2 deletions
|
@ -25,8 +25,7 @@ class Capybara::Selenium::Node < Capybara::Driver::Node
|
|||
elsif tag_name == 'input' and type == 'file'
|
||||
native.send_keys(value.to_s)
|
||||
elsif tag_name == 'textarea' or tag_name == 'input'
|
||||
native.clear
|
||||
native.send_keys(value.to_s)
|
||||
native.send_keys(("\b" * native[:value].size) + value.to_s)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue