From aa50e1e1fbef10ff1c2b7c295d9190278bee7ba8 Mon Sep 17 00:00:00 2001 From: Nico Schedel Date: Thu, 9 Sep 2021 11:13:22 +0200 Subject: [PATCH] TT#70901 selenium: fix missing string conversions in call forwarding Day would not get converted to string, if day > 10, fixing that Change-Id: I9d6552a8de960fc985d53d006d1469e88397629d --- t/selenium/testrun.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/selenium/testrun.py b/t/selenium/testrun.py index e94c12de..6b6d0987 100644 --- a/t/selenium/testrun.py +++ b/t/selenium/testrun.py @@ -215,11 +215,11 @@ class testrun(unittest.TestCase): if day < 10: day = "0" + str(day) self.assertTrue( - len(driver.find_elements_by_xpath('//*[@id="csc-wrapper-call-forwarding"]//div/span[2][contains(., "' + datetime.today().strftime('%Y/%m/') + day + '")]')) > 0, + len(driver.find_elements_by_xpath('//*[@id="csc-wrapper-call-forwarding"]//div/span[2][contains(., "' + datetime.today().strftime('%Y/%m/') + str(day) + '")]')) > 0, "'Office hours are...' condition is not correct") print("OK") print("Try to delete second condition...", end="") - driver.find_element_by_xpath('//*[@id="csc-wrapper-call-forwarding"]//div/span[contains(., "' + datetime.today().strftime('%Y/%m/') + day + '")]').click() + driver.find_element_by_xpath('//*[@id="csc-wrapper-call-forwarding"]//div/span[contains(., "' + datetime.today().strftime('%Y/%m/') + str(day) + '")]').click() driver.find_element_by_xpath('/html/body//div//button[contains(., "Delete")]').click() wait_for_invisibility(driver, '//*[@id="csc-wrapper-call-forwarding"]/div/div[2]/div[4]/svg') self.assertTrue(