From 6a6afecf6e67817343f4fab6b63702d41ba33113 Mon Sep 17 00:00:00 2001 From: Nico Schedel Date: Tue, 17 Mar 2020 13:07:41 +0100 Subject: [PATCH] TT#70901 selenium: check if 'ring own phone' is clickable before clicking it - add a wait.until(EC.element_to_be_clickable()) element to all 3 instances where it needs to change 'ring own phone' setting Change-Id: If505ca17c0cd298b2df819a6ad5b30f892a2aa33 --- t/selenium/testrun.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/t/selenium/testrun.py b/t/selenium/testrun.py index c18bfaf4..49dde11f 100644 --- a/t/selenium/testrun.py +++ b/t/selenium/testrun.py @@ -510,6 +510,10 @@ class testrun(unittest.TestCase): Functions.wait_for_loading_screen(driver) print("OK") print("Enable 'Ring own phone'...", end="") + WebDriverWait(driver, 10).until(EC.element_to_be_clickable(( + By.XPATH, '//*[@id="q-app"]//div[@class="q-field-content col-xs-12' + ' col-sm"]/div[@tabindex="0"]/div[@class="q-option-inner ' + 'relative-position"]'))) Functions.click_js( driver, '//*[@id="q-app"]//div[@class="q-field-content col-xs-12 col-sm"]' @@ -797,6 +801,10 @@ class testrun(unittest.TestCase): Functions.wait_for_loading_screen(driver) print("OK") print("Enable 'Ring own phone'...", end="") + WebDriverWait(driver, 10).until(EC.element_to_be_clickable(( + By.XPATH, '//*[@id="q-app"]//div[@class="q-field-content col-xs-12' + ' col-sm"]/div[@tabindex="0"]/div[@class="q-option-inner ' + 'relative-position"]'))) Functions.click_js( driver, '//*[@id="q-app"]//div[@class="q-field-content col-xs-12 col-sm"]' @@ -1110,6 +1118,10 @@ class testrun(unittest.TestCase): Functions.wait_for_loading_screen(driver) print("OK") print("Enable 'Ring own phone'...", end="") + WebDriverWait(driver, 10).until(EC.element_to_be_clickable(( + By.XPATH, '//*[@id="q-app"]//div[@class="q-field-content col-xs-12' + ' col-sm"]/div[@tabindex="0"]/div[@class="q-option-inner ' + 'relative-position"]'))) Functions.click_js( driver, '//*[@id="q-app"]//div[@class="q-field-content col-xs-12 col-sm"]'