From e7979fe9dbdec4dcaae34043ee09ebacf54735fb Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Mon, 11 Nov 2024 21:06:04 -0500 Subject: [PATCH] test: Add more retries until selenium cooperates. --- tools/autotest.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/autotest.py b/tools/autotest.py index 09352d00..d557fd07 100755 --- a/tools/autotest.py +++ b/tools/autotest.py @@ -260,7 +260,12 @@ try: driver.find_element(By.TAG_NAME, 'tf-auth').shadow_root.find_element(By.ID, 'confirm').send_keys('new_password') driver.find_element(By.TAG_NAME, 'tf-auth').shadow_root.find_element(By.ID, 'loginButton').click() wait.until(expected_conditions.presence_of_element_located((By.ID, 'document'))) - driver.find_element(By.TAG_NAME, 'tf-navigation').shadow_root.find_element(By.ID, 'identity').click() + while True: + try: + driver.find_element(By.TAG_NAME, 'tf-navigation').shadow_root.find_element(By.ID, 'identity').click() + break + except: + pass driver.find_element(By.TAG_NAME, 'tf-navigation').shadow_root.find_element(By.ID, 'logout').click() driver.find_element(By.TAG_NAME, 'tf-auth').shadow_root.find_element(By.ID, 'login_label').click() driver.find_element(By.TAG_NAME, 'tf-auth').shadow_root.find_element(By.ID, 'name').send_keys('testuser')