TT#70901 selenium: prevent date selection from choosing year instead of date

When day = 20 for example, it selects the year 20xx instead of the 20. of the
month, due to only checking if button contains number 20. Specifying XPATH
more clearly and dropping contains check to prevent this

Change-Id: I597e181ad2d88e40dfa0efc27dd29bacea7722eb
mr10.0
Nico Schedel 4 years ago
parent 1fb71898df
commit 0d19893f7a

@ -205,7 +205,7 @@ class testrun(unittest.TestCase):
day += 1
driver.find_element_by_xpath('//*[@id="csc-wrapper-call-forwarding"]//div/span[contains(., "condition")]').click()
driver.find_element_by_xpath('/html/body/div[3]/div/div[2]/div/div[3]/div[3]').click()
driver.find_element_by_xpath('/html/body//div/button[contains(., ' + str(day) + ')]').click()
driver.find_element_by_xpath('/html/body//div[@class="q-date__calendar-days fit"]/div[' + str(day) + ']/button').click()
driver.find_element_by_xpath('/html/body//div//button[contains(., "Save")]').click()
wait_for_invisibility(driver, '//*[@id="csc-wrapper-call-forwarding"]/div/div[2]/div[4]/svg')
self.assertTrue(

Loading…
Cancel
Save