Skip to content

4.4.4 - "--headless2" to activate Chromium's new headless mode

Compare
Choose a tag to compare
@mdmintz mdmintz released this 26 Sep 03:32
· 2430 commits to master since this release
0e9afde

--headless2 to activate Chromium's new headless mode

  • Integrate Chromium's new headless mode into SeleniumBase
    --> This resolves #1523
  • Improve get_unique_links() for special scenarios
    --> This resolves #1524
  • Refresh Python dependencies
    --> 8c3c237

Integrate Chromium's new headless mode into SeleniumBase

The Chromium developers recently added a 2nd headless mode (in 2021). See https://bugs.chromium.org/p/chromium/issues/detail?id=706008#c36

Usage (from instantiating Chromium options):

options.add_argument("--headless=chrome")

This new headless mode allows users to get the full functionality of Chrome without limitations. The older, regular headless mode has restricted functionality, did not allow extensions, changed the User-Agent to say HeadlessChrome, and did other things that may have caused problems during automation.

If something works in regular Chrome, it should now work with the newer headless mode too. The only downside is that the new headless mode is slower than the regular headless mode.

To use the new headless mode for SeleniumBase tests, specify: --headless2:

pytest --headless2

What's Changed

  • "--headless2" to activate Chromium's new headless mode by @mdmintz in #1525

Full Changelog: v4.4.3...v4.4.4