diff --git a/rb/lib/selenium/webdriver/common/selenium_manager.rb b/rb/lib/selenium/webdriver/common/selenium_manager.rb index 967a18c93d35d..d2d217aebb6f4 100644 --- a/rb/lib/selenium/webdriver/common/selenium_manager.rb +++ b/rb/lib/selenium/webdriver/common/selenium_manager.rb @@ -63,7 +63,7 @@ def generate_command(binary, options) end if options.respond_to?(:binary) && !options.binary.nil? command << '--browser-path' - command << options.binary.gsub('\\', '\\\\\\') + command << options.binary.squeeze('\\').gsub('\\', '\\\\\\') end if options.proxy command << '--proxy'