How to run a headless driver with user-data-dir and a running headful browser instance? #2640
-
Can I open the driver in headless mode using user-data-dir, but if the browser is already open in headful mode? It works for me:
or
or
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Chrome has two types of headless modes (https://stackoverflow.com/a/73840130/7058266) which are triggered by:
The original headless mode has limited functionality, but is a little faster. In SeleniumBase, the original headless mode is triggered by Sometimes, the newer headless mode will be used automatically (even if specifying the original one) because some things such as UC Mode require the newer headless mode to work. However, for optimal UC Mode performance, Xvfb should be used in order to allow a headed browser in a headless Linux environment:
|
Beta Was this translation helpful? Give feedback.
Chrome has two types of headless modes (https://stackoverflow.com/a/73840130/7058266) which are triggered by:
options.add_argument("--headless")
# The original headless modeoptions.add_argument("--headless=new")
# The newer headless modeThe original headless mode has limited functionality, but is a little faster.
The newer headless mode has the same functionality as regular Chrome.
In SeleniumBase, the original headless mode is triggered by
--headless
/headless=True
.In SeleniumBase, the newer headless mode is triggered by
--headless2
/headless2=True
.Sometimes, the newer headless mode will be used automatically (even if specifying the original one) because some things such as UC Mode…