Skip to content

Commit f3ab202

Browse files
committed
[rb] skip options with nil value
1 parent 5e39f36 commit f3ab202

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rb/lib/selenium/webdriver/common/options.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def w3c?(key)
126126
end
127127

128128
def process_w3c_options(options)
129-
w3c_options = options.select { |key, _val| w3c?(key) }
129+
w3c_options = options.select { |key, val| w3c?(key) && !val.nil? }
130130
w3c_options[:unhandled_prompt_behavior] &&= w3c_options[:unhandled_prompt_behavior]&.to_s&.tr('_', ' ')
131131
options.delete_if { |key, _val| w3c?(key) }
132132
w3c_options

rb/spec/unit/selenium/webdriver/ie/service_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ module IE
8484
end
8585

8686
it 'is created when :url is not provided' do
87-
allow(SeleniumManager).to receive(:driver_path).and_return('path')
87+
allow(DriverFinder).to receive(:path).and_return('path')
8888
allow(Platform).to receive(:assert_file)
8989
allow(Platform).to receive(:assert_executable)
9090
allow(described_class).to receive(:new).and_return(service)

0 commit comments

Comments
 (0)