From 44d0352ec6a657a3dadadfce77747a6b5b14bc8c Mon Sep 17 00:00:00 2001 From: Nico Schedel Date: Fri, 30 Jul 2021 13:55:51 +0200 Subject: [PATCH] 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 --- t/selenium/functions/Collections.py | 2 +- t/selenium/testrun.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/t/selenium/functions/Collections.py b/t/selenium/functions/Collections.py index ab30915074..da155a8d6d 100644 --- a/t/selenium/functions/Collections.py +++ b/t/selenium/functions/Collections.py @@ -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"]'))) diff --git a/t/selenium/testrun.py b/t/selenium/testrun.py index 5ae6dd6db5..545f3a498e 100644 --- a/t/selenium/testrun.py +++ b/t/selenium/testrun.py @@ -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")