-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Default driver issues a warning #2511
Comments
Selenium changed in v4 - If you need the warning gone immediately please register your own driver config, or I'll look at getting this updated for the next release of Capybara |
thanks |
Here's what I did to update my registered driver (changed # Before
Capybara.register_driver :chrome_headless do |app|
Capybara::Selenium::Driver.new app,
browser: :chrome,
clear_session_storage: true,
clear_local_storage: true,
options: Selenium::WebDriver::Chrome::Options.new(
args: %w[headless disable-gpu no-sandbox window-size=1024,768],
)
end
# After
Capybara.register_driver :chrome_headless do |app|
Capybara::Selenium::Driver.new app,
browser: :chrome,
clear_session_storage: true,
clear_local_storage: true,
capabilities: [Selenium::WebDriver::Chrome::Options.new(
args: %w[headless disable-gpu no-sandbox window-size=1024,768],
)]
end |
Should be fixed via a958240 |
thanks |
Thanks! I was trying to figure out where this deprecation warning had started coming from in my build too. I'm not using the "default driver", but am doing Updating from Confirmed that using capybara master branch at a958240 made warning go away. @twalpole , is there any chance of a capybara patch release including a958240, so we can avoid the warning while updating selenium, without having to do a local custom driver registration? |
@jrochkind Not sure when I’ll have time to do a release, there’s a few other things I need to finish up first. Run master, or create a custom registration if the warning is important to you. Personally I have projects that are running tests with the warning, since it’s a warning, not an error, and it’s in test code not production |
OK, thanks @twalpole ! If anyone wants to temporarily suppress the deprecation warning until the next capybara release is out, while using Selenium 4.1, turns out
(I just don't like it showing up in my build output in the middle of rspec example output, which is how it shows up for me. Could hypothetically cause problems for automation trying to use that output, although I admit I don't actually have any of that at the moment. I just like keeping things clean when I update my dependencies). |
According to this issue the fix has been merged into capybara but hasn't been released yet. teamcapybara/capybara#2511
According to this issue the fix has been merged into capybara but hasn't been released yet. teamcapybara/capybara#2511
In May 2022, copy pasting the |
The fix in question should be included in Capybara 3.73.0 (released May 7 2022) and subsequent, so should not require special configuration to silence deprecation any longer. |
Note: The version number referenced above should be Capybara 3.37.0 (not 3.73.0). |
Meta
Capybara Version: 3.36.0
Driver Information (and browser if relevant): Chrome Version 96.0.4664.55 (Official Build) (x86_64)
Expected Behavior
No warnings
Actual Behavior
Steps to reproduce
I'm using the default driver, nothing special, selenium-webdriver (4.0.3) (maybe it's on selenium-webdriver gem, not sure)
The text was updated successfully, but these errors were encountered: