TT#122872 selenium: fix for customer status not changing properly

sometimes test would crash, due to customer status not beeing able
to change, this commit should fix this

Change-Id: I46544eb1f51d75f0eb850e39060fb4cda07155ea
mr9.5.1
Nico Schedel 4 years ago
parent 1448b76ef2
commit 8eeee42d20

@ -475,6 +475,10 @@ class testrun(unittest.TestCase):
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()
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//label//').click()
driver.implicitly_wait(10)
driver.find_element_by_xpath('/html/body//div[@class="q-item__label"][contains(., "Locked")]').click()
wait_for_invisibility(driver, '/html/body//div[@class="q-virtual-scroll__content"]')
driver.find_element_by_xpath('/html/body//div/button[contains(., "Save")]').click()

Loading…
Cancel
Save