0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-06-16 00:04:48 +02:00

Changed to TimeoutError; Updated selector

This commit is contained in:
Arne Tarara 2023-12-30 13:56:33 +01:00
parent e6da52e9c3
commit 7ce555bae0
No known key found for this signature in database
GPG key ID: 2540198A4079785B
4 changed files with 16 additions and 16 deletions

View file

@ -2,7 +2,7 @@ import sys
import contextlib
from time import time_ns, sleep
from playwright.sync_api import Playwright, sync_playwright
from playwright.sync_api import Playwright, sync_playwright, TimeoutError
def log_note(message: str) -> None:
timestamp = str(time_ns())[:16]
@ -31,8 +31,8 @@ def create_user(playwright: Playwright, browser_name: str, username: str, passwo
# Sleep to make sure the modal has time to appear before continuing navigation
sleep(5)
with contextlib.suppress(Exception):
page.get_by_role("button", name="Close modal").click(timeout=15_000)
with contextlib.suppress(TimeoutError):
page.locator('button.first-run-wizard__close-button').click(timeout=15_000)
log_note("Create user")
page.get_by_role("link", name="Open settings menu").click()
page.get_by_role("link", name="Users").first.click()