Skip to content

Use the new headless Chrome on the pre-registered driver#2726

Merged
twalpole merged 1 commit intoteamcapybara:masterfrom
neilvcarvalho:nc-chrome-120
Dec 11, 2023
Merged

Use the new headless Chrome on the pre-registered driver#2726
twalpole merged 1 commit intoteamcapybara:masterfrom
neilvcarvalho:nc-chrome-120

Conversation

@neilvcarvalho
Copy link
Copy Markdown
Contributor

@neilvcarvalho neilvcarvalho commented Dec 8, 2023

Earlier this year (2023), Chrome released Chrome for Testing, a new Chrome flavor that targets testing and automation use cases. This flavor has been accessible using the --headless=new option since Chrome 109, released on January 1, 2023. This new mode supports the full browser capabilities, including running extensions.

The default headless mode is still pointed to --headless=old for now, but it's planned to be changed to new over time.

This commit explicitly chooses the new headless mode, that uses Chrome for Testing.

Solves #2725

Earlier this year (2023), Chrome released Chrome for Testing, a new
Chrome flavor that targets the testing and automation use cases. This
flavor is accessible using the `--headless=new` option since Chrome 109,
released January 1, 2023. This new mode supports the full browser
capabilities, including running extensions.

The default headless mode is still pointed to `--headless=old` for now,
but it's planned to be changed to `new` over time.

This commit explicitly chooses the `new` headless mode, that uses Chrome
for Testing.
@twalpole twalpole merged commit e2f9f6c into teamcapybara:master Dec 11, 2023
@neilvcarvalho neilvcarvalho deleted the nc-chrome-120 branch December 12, 2023 23:10
@jagthedrummer
Copy link
Copy Markdown

Just curious if there's an ETA on releasing a new version with this fix.

jagthedrummer added a commit to bullet-train-co/bullet_train that referenced this pull request Dec 14, 2023
See this issue on Capybara for additional details:
teamcapybara/capybara#2726

This PR just registers a new version of `:selenium_chrome_headless`
instead of using the one registered in the `capybara` gem. The new one
just mirrors the fix that's already been applied to the gem, but not yet
released to rubygems.org. Once a new version of `capybara` is out, we
can remove the custom driver.
jagthedrummer added a commit to bullet-train-co/bullet_train that referenced this pull request Dec 14, 2023
* Trying to debug a flaky test

* will this help

* Fix for new versions of Chrome/webdriver

See this issue on Capybara for additional details:
teamcapybara/capybara#2726

This PR just registers a new version of `:selenium_chrome_headless`
instead of using the one registered in the `capybara` gem. The new one
just mirrors the fix that's already been applied to the gem, but not yet
released to rubygems.org. Once a new version of `capybara` is out, we
can remove the custom driver.

* dang linter

* Don't actually need that
@neilvcarvalho
Copy link
Copy Markdown
Contributor Author

For folks following this and waiting for a gem update: Selenium released this week a version supporting the old headless mode

@simi
Copy link
Copy Markdown
Contributor

simi commented Feb 27, 2024

IMHO it is too early to make this default. New headless mode broke (or make flaky) a lot of Chrome automated usage I have seen (random, not even using Selenium or Capybara).

@twalpole
Copy link
Copy Markdown
Member

Then you have the freedom to setup your own config

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.

4 participants