From 5257dedb87264a298c7bee3d63e84e5b7ea1f045 Mon Sep 17 00:00:00 2001 From: Nico Schedel Date: Mon, 26 Jul 2021 11:56:32 +0200 Subject: [PATCH] TT#70901 selenium: fix up logout_csc function logout_csc was not working at all, fixing it Change-Id: I96fbae6e9577f287683fa6f9586242fe7bd72d03 --- t/selenium/functions/Collections.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/t/selenium/functions/Collections.py b/t/selenium/functions/Collections.py index 3a2acf0e..365010a1 100644 --- a/t/selenium/functions/Collections.py +++ b/t/selenium/functions/Collections.py @@ -16,8 +16,9 @@ def login_csc(driver, name, pwd): def logout_csc(driver): - WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, '//*[@id="csc-header-toolbar"]/div[1]/button'))) - driver.find_element_by_xpath('//*[@id="csc-header-toolbar"]/div[1]/button').click() + WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, '//*[@id="csc-header-toolbar-main"]/button[2]'))) + driver.find_element_by_xpath('//*[@id="csc-header-toolbar-main"]/button[2]').click() + scroll_to_element(driver, '/html/body//div[contains(text(), "Logout")]') driver.find_element_by_xpath('/html/body//div[contains(text(), "Logout")]').click()