TT#122872 selenium: fix customer button position

A new column has been added to customer tests, adjusting others to
fit

Change-Id: Idbe56c86ab106cb4a6f58c2a87caf64570acc472
mr10.0
Nico Schedel 4 years ago
parent 16ca366f47
commit f364d5f268

@ -473,8 +473,8 @@ class testrun(unittest.TestCase):
len(driver.find_elements_by_xpath('//*[@id="q-app"]//div//main//div//table/tbody/tr[1]/td[contains(., "' + customername + '")]')) > 0, "Reseller was not found")
print("OK")
print("Try to edit customer status...", end="")
scroll_to_element(driver, '//*[@id="q-app"]/div//main//div//table/tbody/tr[1]/td[9]/span')
driver.find_element_by_xpath('//*[@id="q-app"]/div//main//div//table/tbody/tr[1]/td[9]/span').click()
scroll_to_element(driver, '//*[@id="q-app"]/div//main//div//table/tbody/tr[1]/td[10]/span')
driver.find_element_by_xpath('//*[@id="q-app"]/div//main//div//table/tbody/tr[1]/td[10]/span').click()
driver.implicitly_wait(1)
if len(driver.find_elements_by_xpath('/html/body//div[@class="q-item__label"][contains(., "Locked")]')) == 0:
driver.find_element_by_xpath('/html/body/div[4]/label').click()
@ -483,11 +483,11 @@ class testrun(unittest.TestCase):
wait_for_invisibility(driver, '/html/body//div[@class="q-virtual-scroll__content"]')
driver.find_element_by_xpath('/html/body//div/button[contains(., "Save")]').click()
self.assertTrue(
len(driver.find_elements_by_xpath('//*[@id="q-app"]/div//main//div//table/tbody/tr[1]/td[9]/span[contains(., "Locked")]')) > 0, "Subscriber status was not edited")
len(driver.find_elements_by_xpath('//*[@id="q-app"]/div//main//div//table/tbody/tr[1]/td[10]/span[contains(., "Locked")]')) > 0, "Subscriber status was not edited")
print("OK")
print("Go to customer preferences...", end="")
scroll_to_element(driver, '//*[@id="q-app"]/div//main//div//table/tbody/tr[1]/td[11]/button')
click_js(driver, '//*[@id="q-app"]/div//main//div//table/tbody/tr[1]/td[11]/button')
scroll_to_element(driver, '//*[@id="q-app"]/div//main//div//table/tbody/tr[1]/td[12]/button')
click_js(driver, '//*[@id="q-app"]/div//main//div//table/tbody/tr[1]/td[12]/button')
WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '/html/body//div/a[contains(., "Preferences")]')))
driver.find_element_by_xpath('/html/body//div/a[contains(., "Preferences")]').click()
print("OK")
@ -520,7 +520,7 @@ class testrun(unittest.TestCase):
WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, '/html/body//div/main//div/label//div/input')))
fill_element(driver, '/html/body//div/main//div/label//div/input', customername)
WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '//*[@id="q-app"]//div//main//div//table/tbody/tr[1]/td[contains(., "' + customername + '")]')))
driver.find_element_by_xpath('//*[@id="q-app"]/div//main//div//table/tbody/tr[1]/td[11]/button').click()
driver.find_element_by_xpath('//*[@id="q-app"]/div//main//div//table/tbody/tr[1]/td[12]/button').click()
WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '/html/body/div[4]/div/div')))
driver.find_element_by_xpath('/html/body/div[4]/div/div').click()
WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '/html/body/div[4]/div[2]/div/div[3]/button[2]')))

Loading…
Cancel
Save