Код: Выделить всё
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
chrome_driver_path = r"C:\Program Files\chromedriver-win64\chromedriver.exe" # Update this path
# Set up ChromeDriver service
service = Service(chrome_driver_path)
# Set up Chrome options to use the existing profile
chrome_options = Options()
chrome_options.add_argument("--headless=new")
chrome_options.add_argument(r"user-data-dir=c:\Users\...\Default") # Path to your Chrome profile
# Initialize Selenium WebDriver with the same profile
driver = webdriver.Chrome(service=service, options=chrome_options)

Весь экран, кроме панели задач Windows, станет белым. Чтобы очистить белый экран, мне нужно дважды нажать Alt-Tab.
Подробнее здесь: https://stackoverflow.com/questions/789 ... -it-always