Fix NoMethodError with headless Chrome 119+ (and deprecation warning with headless Chrome)#53
Open
dan-jensen wants to merge 2 commits intohashrocket:masterfrom
Open
Conversation
In selenium-webdriver 4.8.0, the `headless!` method was deprecated and now raises a warning. This updates to use syntax that does not raise a warning, but is still friendly to versions of Chrome before v109.
Contributor
Author
|
@dillonhafer just want to draw attention to this PR from June. Hopefully an easy merge. |
Chrome now allows the --headless option to be specified with a value. This applies the "new" value so the latest version will be used.
Contributor
Author
|
I just updated this PR to use Originally, this PR implemented the syntax used by Capybara's |
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The selenium-webdriver gem's
headless!method was deprecated, it now raises a warning.This updates to use the recommended syntax. This new syntax is NOT compatible with Chrome versions before v109.
Additional details:
Options#headless!is deprecated. UseOptions#add_argument('--headless=new')instead."selenium-webdriversuggests using...=new. That syntax is only appropriate for Chrome v109+ (meaning Chrome versions released 2023-01-10 onward). (See the code comment for details.)