Skip to content

Commit

Permalink
actually do not camel case fx prefs (SeleniumHQ#9944)
Browse files Browse the repository at this point in the history
follow-up to eb2d017
  • Loading branch information
glaszig authored and elgatov committed Jun 27, 2022
1 parent add4742 commit 2803a9d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rb/lib/selenium/webdriver/firefox/options.rb
Expand Up @@ -175,7 +175,7 @@ def process_profile(profile)
end

def camelize?(key)
key != :prefs
key != "prefs"
end
end # Options
end # Firefox
Expand Down
8 changes: 8 additions & 0 deletions rb/spec/unit/selenium/webdriver/firefox/options_spec.rb
Expand Up @@ -149,6 +149,14 @@ module Firefox
options.add_preference(:foo, 'bar')
expect(options.prefs[:foo]).to eq('bar')
end

it 'does not camelize preferences' do
options.add_preference('intl.accepted_languages', 'en-US')

prefs = options.as_json['moz:firefoxOptions']['prefs']
expected = { 'intl.accepted_languages' => 'en-US' }
expect(prefs).to eq(expected)
end
end

describe '#enable_android' do
Expand Down

0 comments on commit 2803a9d

Please sign in to comment.