Skip to content

Commit cd0d330

Browse files
committed
Update docker image and add webdriver-manager to browser tests
1 parent 0f68ea1 commit cd0d330

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
lint-unit-39: &lint-unit
8383
working_directory: ~/dash
8484
docker:
85-
- image: cimg/python:3.9-browsers
85+
- image: circleci/python:3.9.4-node-browsers
8686
auth:
8787
username: dashautomation
8888
password: $DASH_PAT_DOCKERHUB
@@ -102,6 +102,7 @@ jobs:
102102
command: |
103103
python -m venv venv && . venv/bin/activate
104104
pip install --upgrade pip wheel
105+
pip install webdriver-manager
105106
pip install -e .[ci,dev,testing] --no-cache-dir --progress-bar off
106107
- run:
107108
name: 🌸 Python & JS Lint

dash/testing/browser.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
MoveTargetOutOfBoundsException,
2121
)
2222

23+
from webdriver_manager.chrome import ChromeDriverManager
24+
from webdriver_manager.utils import ChromeType
25+
from webdriver_manager.firefox import GeckoDriverManager
26+
2327
from dash.testing.wait import text_to_equal, style_to_equal, contains_text, until
2428
from dash.testing.dash_page import DashPageMixin
2529
from dash.testing.errors import DashAppLoadingError, BrowserError, TestingTimeoutError
@@ -473,7 +477,11 @@ def _get_chrome(self):
473477
desired_capabilities=capabilities,
474478
)
475479
if self._remote
476-
else webdriver.Chrome(options=options, desired_capabilities=capabilities)
480+
else webdriver.Chrome(
481+
ChromeDriverManager(chrome_type=ChromeType.GOOGLE).install(),
482+
options=options,
483+
desired_capabilities=capabilities,
484+
)
477485
)
478486

479487
# https://bugs.chromium.org/p/chromium/issues/detail?id=696481
@@ -516,7 +524,10 @@ def _get_firefox(self):
516524
)
517525
if self._remote
518526
else webdriver.Firefox(
519-
firefox_profile=fp, options=options, capabilities=capabilities
527+
executable_path=GeckoDriverManager().install(),
528+
firefox_profile=fp,
529+
options=options,
530+
capabilities=capabilities,
520531
)
521532
)
522533

0 commit comments

Comments
 (0)