Re:New headless Chrome has been released and has a near-perf...
by mixedCase on Sunday February 19, 2023 @11:41AM
(#34859125)
FWIW, ChatGPT's response:
-------------
To specify the "new" part of the --headless=new flag in Python, you can use the add_argument method of the Options class from selenium.webdriver.chrome.options.
Here's an example code snippet that shows how to use it:
from selenium.webdriver.chrome.options import Options
options = Options()
options.add_argument('--headless=new')
In this example, the add_argument method is used to add the --headless=new flag to the Options object. This will enable the "new" headless mode in Chrome.Note that this flag is only available in Chrome version 87 and above. If you're using an earlier version of Chrome, this flag won't work.
Re:New headless Chrome has been released and has a near-perf...
by pRusya on Sunday February 19, 2023 @01:19PM
(#34860254)
There's a mention to this in the recent Selenium blog post https://www.selenium.dev/blog/2023/headless-is-going-away/#a...
Basically omit options.headless and use options.add_argument("--headless=new") instead.
The article mentions that to use this you need to specify the --headless=new flag.
I know that to set the headless flag i can just use this code:
But how would I specify the new part of the flag/option?