File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
lib/selenium/webdriver/remote
spec/integration/selenium/webdriver Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -392,7 +392,7 @@ def send_keys_to_element(element, keys)
392
392
# TODO: rework file detectors before Selenium 4.0
393
393
if @file_detector
394
394
local_files = keys . first &.split ( "\n " ) &.map { |key | @file_detector . call ( Array ( key ) ) } &.compact
395
- if local_files . any?
395
+ if local_files & .any?
396
396
keys = local_files . map { |local_file | upload ( local_file ) }
397
397
keys = Array ( keys . join ( "\n " ) )
398
398
end
Original file line number Diff line number Diff line change @@ -87,6 +87,14 @@ module WebDriver
87
87
end
88
88
end
89
89
90
+ it 'should send empty keys' do
91
+ driver . navigate . to url_for ( 'formPage.html' )
92
+ element = wait_for_element ( id : 'working' )
93
+ element . send_keys
94
+ expect ( element . text ) . to be_empty
95
+ end
96
+
97
+
90
98
it 'should send string keys' do
91
99
driver . navigate . to url_for ( 'formPage.html' )
92
100
wait_for_element ( id : 'working' )
You can’t perform that action at this time.
0 commit comments