We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 601c8ba commit 57c6495Copy full SHA for 57c6495
1 file changed
dash/testing/browser.py
@@ -515,10 +515,10 @@ def _get_chrome(self):
515
516
# Enable downloads in headless mode
517
# https://bugs.chromium.org/p/chromium/issues/detail?id=696481
518
- if self._headless and self.download_path:
+ if self._headless and self.download_path and hasattr(chrome, "execute_cdp_cmd"):
519
try:
520
- # Modern approach using CDP command
521
- chrome.execute_cdp_cmd(
+ # Modern approach using CDP command (Chrome only)
+ chrome.execute_cdp_cmd( # type: ignore[union-attr]
522
"Page.setDownloadBehavior",
523
{"behavior": "allow", "downloadPath": self.download_path},
524
)
0 commit comments