From 46b000ae2123059f37fdb70bbe390b9b8a62df5b Mon Sep 17 00:00:00 2001 From: Leon Date: Fri, 2 Jun 2023 23:04:09 +0200 Subject: [PATCH] Update __init__.py --- undetected_chromedriver/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/undetected_chromedriver/__init__.py b/undetected_chromedriver/__init__.py index 5934f26..0ddd8d0 100644 --- a/undetected_chromedriver/__init__.py +++ b/undetected_chromedriver/__init__.py @@ -383,10 +383,12 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver): options.arguments.extend(["--no-sandbox", "--test-type"]) if headless or options.headless: - if self.patcher.version_main < 108: - options.add_argument("--headless=chrome") - elif self.patcher.version_main >= 108: - options.add_argument("--headless=new") + #workaround until a better checking is found + options.add_argument("--headless=new") + #if self.patcher.version_main < 108: + # options.add_argument("--headless=chrome") + #elif self.patcher.version_main >= 108: + options.add_argument("--window-size=1920,1080") options.add_argument("--start-maximized")