Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions dash/testing/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def __init__(
percy_assets_root="",
wait_timeout=10,
pause=False,
driver=None,
):
self._browser = browser.lower()
self._remote_url = remote_url
Expand All @@ -65,8 +66,11 @@ def __init__(
self._percy_run = percy_run
self._pause = pause

self._driver = until(self.get_webdriver, timeout=1)
self._driver.implicitly_wait(2)
if driver:
self._driver = driver
else:
self._driver = until(self.get_webdriver, timeout=1)
self._driver.implicitly_wait(2)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want the implicitly_wait inside here or would it be better to always call that even if you provide your own driver?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets set the implicitly_wait(2) for all, since there is no easy way to confirm if the driver already has one set.


self._wd_wait = WebDriverWait(self.driver, wait_timeout)
self._last_ts = 0
Expand Down