diff --git a/rb/lib/selenium/webdriver/firefox/extension.rb b/rb/lib/selenium/webdriver/firefox/extension.rb index 348410d656c6c..ab588a3a562b6 100644 --- a/rb/lib/selenium/webdriver/firefox/extension.rb +++ b/rb/lib/selenium/webdriver/firefox/extension.rb @@ -87,6 +87,14 @@ def read_id_from_manifest_json(directory) return unless File.exist?(manifest_path) manifest = JSON.parse(File.read(manifest_path)) + gecko_id(manifest) || name_and_version(manifest) + end + + def gecko_id(manifest) + manifest.dig('browser_specific_settings', 'gecko', 'id')&.strip + end + + def name_and_version(manifest) [manifest['name'].delete(' '), manifest['version']].join('@') end end # Extension