Skip to content

Commit

Permalink
[rb] allow keys to be an empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Oct 20, 2021
1 parent 508dac4 commit ef41797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rb/lib/selenium/webdriver/remote/bridge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def click_element(element)
def send_keys_to_element(element, keys)
# TODO: rework file detectors before Selenium 4.0
if @file_detector
local_files = keys.first.split("\n").map { |key| @file_detector.call(Array(key)) }.compact
local_files = keys.first&.split("\n")&.map { |key| @file_detector.call(Array(key)) }&.compact
if local_files.any?
keys = local_files.map { |local_file| upload(local_file) }
keys = Array(keys.join("\n"))
Expand Down

0 comments on commit ef41797

Please sign in to comment.