From cdc53a7999425c3e1c77e8740631e28436bb94a9 Mon Sep 17 00:00:00 2001 From: Nico Schedel Date: Thu, 22 Jul 2021 12:45:46 +0200 Subject: [PATCH] TT#70901 selenium: fix weird music on hold behavior Fix issue where music on hold button was not pressed properly Change-Id: I17f5787b0d7c31451f3ac0178d039718421b61af --- t/selenium/testrun.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/selenium/testrun.py b/t/selenium/testrun.py index 851c83b5..c7575f52 100644 --- a/t/selenium/testrun.py +++ b/t/selenium/testrun.py @@ -399,7 +399,8 @@ class testrun(unittest.TestCase): "General page wasnt opened") print("OK") print("Try to enable 'Music on Hold'...", end="") - driver.find_element_by_xpath('//*[@id="csc-page-voicebox"]//div[@aria-label="Music on Hold"]/div[1]').click() + wait_for_invisibility(driver, '//*[@id="csc-page-voicebox"]/div/div[1]/div[2]/svg') + click_js(driver, '//*[@id="csc-page-voicebox"]//div[@aria-label="Music on Hold"]/div[1]') self.assertTrue( len(driver.find_elements_by_xpath('//*[@id="csc-page-voicebox"]//div[@aria-checked="true"]')) > 0, "Music on Hold was not enabled")