Skip to content
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3966bfe
handled nil condition for Cookie Method in ruby
rpallavisharma Jan 16, 2025
10cc4d3
modified error message for cookie
rpallavisharma Jan 16, 2025
ed47fde
[rb]modified delete cookie code for ruby
rpallavisharma Jan 20, 2025
d3ae86c
Merge branch 'trunk' into pallavi-getCookieRuby
harsha509 Jan 20, 2025
2d6f8b0
[rb]modified cookie method
rpallavisharma Jan 20, 2025
3b57ce1
Merge branch 'trunk' into pallavi-getCookieRuby
rpallavisharma Jan 20, 2025
4aa7080
[rb] modified code for delete cookie
rpallavisharma Jan 20, 2025
310a719
Merge branch 'pallavi-getCookieRuby' of https://github.com/pallavigit…
rpallavisharma Jan 20, 2025
150b92c
[rb] modified as per suggestion by Augustin
rpallavisharma Jan 20, 2025
c6d198b
Merge branch 'trunk' into pallavi-getCookieRuby
rpallavisharma Jan 21, 2025
008d4b8
Merge branch 'trunk' into pallavi-getCookieRuby
aguspe Feb 15, 2025
3d42267
Merge branch 'trunk' into pallavi-getCookieRuby
rpallavisharma Feb 17, 2025
b0482dc
Merge branch 'SeleniumHQ:trunk' into pallavi-getCookieRuby
rpallavisharma Mar 3, 2025
81e72f9
modified code files
rpallavisharma Mar 5, 2025
5ea276d
Merge branch 'pallavi-getCookieRuby' of https://github.com/pallavigit…
rpallavisharma Mar 5, 2025
fa7bf13
Merge branch 'trunk' into pallavi-getCookieRuby
rpallavisharma Mar 5, 2025
7299d44
modified extra line
rpallavisharma Mar 5, 2025
d8ec72b
Merge branch 'pallavi-getCookieRuby' of https://github.com/pallavigit…
rpallavisharma Mar 5, 2025
0f3f82b
Merge branch 'SeleniumHQ:trunk' into pallavi-getCookieRuby
rpallavisharma Mar 5, 2025
436a1a4
modified code
rpallavisharma Mar 5, 2025
9f568ce
Merge branch 'SeleniumHQ:trunk' into pallavi-getCookieRuby
rpallavisharma Mar 5, 2025
336a0bf
Merge branch 'trunk' into pallavi-getCookieRuby
rpallavisharma Mar 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rb/lib/selenium/webdriver/remote/bridge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +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?
execute :delete_cookie, name: name
end

Expand Down
5 changes: 5 additions & 0 deletions rb/spec/integration/selenium/webdriver/manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,11 @@ module WebDriver
expect(driver.manage.all_cookies.find { |c| c[:name] == 'foo' }).to be_nil
end

it 'throws error when cookie name is empty string' do
expect { driver.manage.delete_cookie('') }
.to raise_exception(ArgumentError)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pallavigitwork this test is failing due to expected ArgumentError but nothing was raised you need to pass nil or an empty hash to make this test work

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok thank you @aguspe . I will try to fix this by this thursday. i will work on the feedback you gave. thank you for your time.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made changes. requesting review, @aguspe

end

it 'deletes all' do
driver.manage.add_cookie name: 'foo', value: 'bar'
driver.manage.add_cookie name: 'bar', value: 'foo'
Expand Down
Loading