TT#122872 selenium: fix logout function

logout function would press the new "change password" button instead
of logout, this should fix it

Change-Id: I629fa1eb1dd13914cf7ff741c97dda0708a0889e
mr10.0
Nico Schedel 4 years ago
parent 02f3f6b3a1
commit 44d0352ec6

@ -25,7 +25,7 @@ def login_panel(driver, username="administrator", password="administrator"):
def logout_panel(driver):
driver.find_element_by_xpath('//*[@id="q-app"]//div/button[@aria-label="UserMenu"]').click()
driver.find_element_by_xpath('/html/body//div[@class="q-list"]/div[1]').click()
driver.find_element_by_xpath('/html/body//div[@class="q-list"]/div[2]').click()
WebDriverWait(driver, 10).until(EC.visibility_of_element_located((By.XPATH, '//*[@id="login-title"]')))

@ -786,7 +786,7 @@ class testrun(unittest.TestCase):
print("OK")
print("Try to logout...", end="")
driver.find_element_by_xpath('//*[@id="q-app"]//div/button[@aria-label="UserMenu"]').click()
driver.find_element_by_xpath('/html/body//div[@class="q-list"]/div[1]').click()
driver.find_element_by_xpath('/html/body//div[@class="q-list"]/div[2]').click()
self.assertTrue(
len(driver.find_elements_by_xpath('//*[@id="login-title"]')) > 0, "Logout wasnt successful")
print("OK")

Loading…
Cancel
Save