From 033dae67cd42f691295bb503b9547cc07a41d708 Mon Sep 17 00:00:00 2001 From: Nico Schedel Date: Mon, 13 Jan 2020 12:03:07 +0100 Subject: [PATCH] TT#70901 selenium: fix a wait condition in call_forward_always - wait for the loading screen to go away instead of waiting until the button is clickable. should work better Change-Id: If9d0d33fad0c543db5883af439ae87a53d681723 --- t/selenium/testrun.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/t/selenium/testrun.py b/t/selenium/testrun.py index 76bccc3d..a8fd87b9 100644 --- a/t/selenium/testrun.py +++ b/t/selenium/testrun.py @@ -280,9 +280,12 @@ class testrun(unittest.TestCase): driver.find_element_by_xpath( '//*[@id="main-menu"]//div[@class="q-item-label"]' '[contains(text(), "Always")]').click() - WebDriverWait(driver, 10).until(EC.element_to_be_clickable(( - By.XPATH, '//*[@id="q-app"]//div[1]/div' - '[@class="add-destination-form"]/button'))) + driver.implicitly_wait(2) + WebDriverWait(driver, 10).until(EC.invisibility_of_element_located(( + By.XPATH, '//div[@class="q-loading animate-fade fullscreen column ' + 'flex-center z-maxundefined"]/svg[@class="q-spinner q-spinner-mat ' + 'text-white"]'))) + driver.implicitly_wait(10) driver.find_element_by_xpath( '//*[@id="q-app"]//div[1]/div[@class="add-destination-form"]' '/button').click()