Skip to content

Commit 05d7983

Browse files
committed
remove experimental chrome options
1 parent 5185f1f commit 05d7983

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

dash/testing/browser.py

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import warnings
88
import percy
99
import requests
10-
import tempfile
1110

1211
from selenium import webdriver
1312
from selenium.webdriver.support import expected_conditions as EC
@@ -486,36 +485,10 @@ def _get_chrome(self):
486485
if "DASH_TEST_CHROMEPATH" in os.environ:
487486
options.binary_location = os.environ["DASH_TEST_CHROMEPATH"]
488487

489-
options.add_experimental_option(
490-
"prefs",
491-
{
492-
"download.default_directory": self.download_path,
493-
"download.prompt_for_download": False,
494-
"download.directory_upgrade": True,
495-
"safebrowsing.enabled": False,
496-
"safebrowsing.disable_download_protection": True,
497-
},
498-
)
499488
options.add_argument("--disable-dev-shm-usage")
500489
options.add_argument("--no-sandbox")
501490
options.add_argument("--disable-gpu")
502-
options.add_argument("--remote-debugging-port=9222")
503-
504-
if not self._remote:
505-
try:
506-
# Create a TemporaryDirectory object.
507-
# It will be cleaned up when self._temp_user_data_dir_manager.cleanup() is called,
508-
# or when the object is garbage collected if not cleaned up explicitly.
509-
self._temp_user_data_dir_manager = tempfile.TemporaryDirectory()
510-
user_data_dir_path = self._temp_user_data_dir_manager.name
511-
options.add_argument(f"--user-data-dir={user_data_dir_path}")
512-
logger.info(
513-
f"Chrome using temporary user data directory: {user_data_dir_path}"
514-
)
515-
except Exception as e:
516-
logger.error(
517-
f"Could not create temporary directory for user-data-dir: {e}"
518-
)
491+
options.add_argument("--remote-debugging-port=0")
519492

520493
chrome = (
521494
webdriver.Remote(command_executor=self._remote_url, options=options) # type: ignore[reportAttributeAccessIssue]

0 commit comments

Comments
 (0)