Skip to content

Commit 57c6495

Browse files
committed
lint-fix
1 parent 601c8ba commit 57c6495

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

dash/testing/browser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -515,10 +515,10 @@ def _get_chrome(self):
515515

516516
# Enable downloads in headless mode
517517
# https://bugs.chromium.org/p/chromium/issues/detail?id=696481
518-
if self._headless and self.download_path:
518+
if self._headless and self.download_path and hasattr(chrome, "execute_cdp_cmd"):
519519
try:
520-
# Modern approach using CDP command
521-
chrome.execute_cdp_cmd(
520+
# Modern approach using CDP command (Chrome only)
521+
chrome.execute_cdp_cmd( # type: ignore[union-attr]
522522
"Page.setDownloadBehavior",
523523
{"behavior": "allow", "downloadPath": self.download_path},
524524
)

0 commit comments

Comments
 (0)