diff --git a/rb/lib/selenium/webdriver/remote/bridge.rb b/rb/lib/selenium/webdriver/remote/bridge.rb index 8b7cf16b47cc2..3f1c8c13df9cf 100644 --- a/rb/lib/selenium/webdriver/remote/bridge.rb +++ b/rb/lib/selenium/webdriver/remote/bridge.rb @@ -385,7 +385,7 @@ def add_cookie(cookie) end def delete_cookie(name) - raise ArgumentError, 'Cookie name cannot be null or empty' if name.nil? || name.empty? + raise ArgumentError, 'Cookie name cannot be null or empty' unless name || !name.empty? execute :delete_cookie, name: name end