From 918ad93cc0ade7716985f185be9b52447f8959cd Mon Sep 17 00:00:00 2001 From: "Douglas Cerna (Soy Douglas)" Date: Sat, 28 Sep 2024 03:15:12 +0000 Subject: [PATCH] Use old headless mode in Chrome browser See issue #14154 on the SeleniumHQ/selenium repo. --- amuser/selenium_ability.py | 2 +- simplebrowsertest.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/amuser/selenium_ability.py b/amuser/selenium_ability.py index d4c22ab..45e6d5f 100644 --- a/amuser/selenium_ability.py +++ b/amuser/selenium_ability.py @@ -39,7 +39,7 @@ def get_driver(self): if self.driver_name == "Chrome": options = webdriver.ChromeOptions() if headless: - options.add_argument("--headless=new") + options.add_argument("--headless=old") driver = webdriver.Chrome(options=options) driver.set_window_size(1700, 900) elif self.driver_name == "Firefox": diff --git a/simplebrowsertest.py b/simplebrowsertest.py index 7459ba1..ded54be 100755 --- a/simplebrowsertest.py +++ b/simplebrowsertest.py @@ -8,7 +8,7 @@ def get_chrome_driver(): options = webdriver.ChromeOptions() - options.add_argument("--headless") + options.add_argument("--headless=old") driver = webdriver.Chrome(options=options) return driver