Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove calls to WebStorage JS methods, fixes #2772 #2773

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bkleinen
Copy link

@bkleinen bkleinen commented Sep 2, 2024

Removed calls to deprecated methods. See

https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES

4.24.0 (2024-08-23)

  • Deprecate WebStorage JS methods (#14276)

SeleniumHQ/selenium#14276

SeleniumHQ/selenium@fc6c070

@bkleinen
Copy link
Author

bkleinen commented Sep 2, 2024

Issue: #2772

@flugsio
Copy link

flugsio commented Sep 6, 2024

I might be wrong, but it seems that this is just deprecated to get an overview how to implement it more consistently SeleniumHQ/selenium#10397 (comment) and Motivation here SeleniumHQ/selenium#14276.

So there will probably be a replacement before removal, so I don't feel like the functionality needs to be removed here. Removing the deprecation messages is possible with

Selenium::WebDriver.logger.ignore(:logger_info, :clear_local_storage, :clear_session_storage)

This is already required in selenium projects to get rid of the logger_info message

@bkleinen
Copy link
Author

bkleinen commented Sep 8, 2024

From my understanding, Capybara already uses the replacement if the methods have been removed:
if @browser.respond_to? :session_storage
@browser.session_storage.clear
else
... call js methods directly

-> thus, I see no need to wait for the actual removement of the methods, and think they can be removed already.

@flugsio
Copy link

flugsio commented Sep 9, 2024

Oh I see, I didn't fully read the capybara implementation 🤦 ... Thanks for explaining it!

PR looks good to me 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants