Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/amd64 python:3.9
FROM python:3.9

ENV POETRY_VERSION=2.1.2 \
POETRY_NO_INTERACTION=1 \
Expand Down
11 changes: 9 additions & 2 deletions nicegui/testing/screen_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,15 @@ def nicegui_remove_all_screenshots() -> None:
@pytest.fixture()
def nicegui_driver(nicegui_chrome_options: webdriver.ChromeOptions) -> Generator[webdriver.Chrome, None, None]:
"""Create a new Chrome driver instance."""
s = Service()
driver_ = webdriver.Chrome(service=s, options=nicegui_chrome_options)
for executable_path in (None, shutil.which('chromedriver'), 'chromedriver'): # Required for ARM devcontainers
try:
s = Service(executable_path=executable_path)
driver_ = webdriver.Chrome(service=s, options=nicegui_chrome_options)
break
except Exception:
continue
else: # no break
raise RuntimeError('Could not start Chrome WebDriver.')
driver_.implicitly_wait(Screen.IMPLICIT_WAIT)
driver_.set_page_load_timeout(4)
yield driver_
Expand Down