Skip to content

Commit 4aa7080

Browse files
[rb] modified code for delete cookie
1 parent 2d6f8b0 commit 4aa7080

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rb/lib/selenium/webdriver/remote/bridge.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def add_cookie(cookie)
385385
end
386386

387387
def delete_cookie(name)
388-
raise Error::ArgumentError, 'Cookie name cannot be null or empty' if name.nil? || name.empty?
388+
raise ArgumentError, 'Cookie name cannot be null or empty' if name.nil? || name.empty?
389389
execute :delete_cookie, name: name
390390
end
391391

rb/spec/integration/selenium/webdriver/manager_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ module WebDriver
244244

245245
it 'throws error when cookie name is empty string' do
246246
expect { driver.manage.delete_cookie('') }
247-
.to raise_exception(Error::ArgumentError)
247+
.to raise_exception(ArgumentError)
248248
end
249249

250250
it 'deletes all' do

0 commit comments

Comments
 (0)