Description
Headless Mode refactoring for the removal of old Headless Mode
As detailed in https://developer.chrome.com/blog/removing-headless-old-from-chrome, Chrome's old headless mode has been removed in Chrome 132. The SeleniumBase headless1
option mapped to it (--headless=old
). Before Chrome's newer headless mode appeared, it was just headless
. After the newer --headless=new
option appeared, the SeleniumBase headless2
option mapped to it.
Now that the old headless mode is gone, a few changes will occur to maintain backwards compatibility:
- If the Chrome version is 132 (or newer),
headless1
will automatically remap to--headless
/--headless=new
. - If the Chrome version is less than 132, then
headless1
will continue mapping to--headless=old
.
So in summary, on Chrome 132 or newer (once this ticket is complete), headless1
is the same as headless
is the same as headless2
. All those will map to the same (new) headless mode on Chrome.
In the meantime, attempting to use the old headless mode on Chrome 132 (or newer) causes the following error to occur:
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: probably user data directory is already in use, please specify a unique value for --user-data-dir argument, or don't use --user-data-dir
(Not sure where that error is coming from, but the message is misleading because the real cause of the error is the removal of Chrome's old headless mode, and not some problem with the user data directory.)