From 0c797a565fbd7cbd4420905b1d09399a5e34297c Mon Sep 17 00:00:00 2001 From: Hugo Slepicka Date: Thu, 9 Mar 2023 21:01:39 -0800 Subject: [PATCH] FIX: Add new headless parameter for Chrome > 108. --- botcity/web/browsers/chrome.py | 1 + botcity/web/browsers/edge.py | 1 + 2 files changed, 2 insertions(+) diff --git a/botcity/web/browsers/chrome.py b/botcity/web/browsers/chrome.py index 1f043d3..5b4293e 100644 --- a/botcity/web/browsers/chrome.py +++ b/botcity/web/browsers/chrome.py @@ -57,6 +57,7 @@ def default_options(headless=False, download_folder_path=None, user_data_dir=Non if headless: chrome_options.add_argument("--headless") + chrome_options.add_argument("--headless=new") chrome_options.add_argument("--disable-gpu") chrome_options.add_argument("--hide-scrollbars") chrome_options.add_argument("--mute-audio") diff --git a/botcity/web/browsers/edge.py b/botcity/web/browsers/edge.py index 6e12ff3..903f526 100644 --- a/botcity/web/browsers/edge.py +++ b/botcity/web/browsers/edge.py @@ -53,6 +53,7 @@ def default_options(headless=False, download_folder_path=None, user_data_dir=Non if headless: edge_options.add_argument("--headless") + edge_options.add_argument("--headless=new") edge_options.add_argument("--disable-gpu") edge_options.add_argument("--hide-scrollbars") edge_options.add_argument("--mute-audio")