mirror of
https://github.com/bunkerity/bunkerized-nginx
synced 2023-12-13 21:30:18 +01:00
Fix timeout in ui tests and access_page function
This commit is contained in:
parent
b1b1ab8680
commit
b9c5d32778
|
@ -130,6 +130,7 @@ def access_page(
|
|||
*,
|
||||
retries: int = 0,
|
||||
):
|
||||
if retries == 0:
|
||||
assert_button_click(driver, button)
|
||||
|
||||
try:
|
||||
|
@ -139,7 +140,7 @@ def access_page(
|
|||
print(f"Didn't get redirected to {name} page, exiting ...", flush=True)
|
||||
exit(1)
|
||||
except TimeoutException:
|
||||
if retries < 3 and driver.current_url.split("/")[-1].startswith("/loading"):
|
||||
if retries < 3 and "/loading" in driver.current_url:
|
||||
sleep(2)
|
||||
access_page(driver, driver_wait, button, name, message, retries=retries + 1)
|
||||
|
||||
|
|
Loading…
Reference in a new issue