TT#70901 selenium: Only switch to old admin UI when necessary

Only press "Go back to old UI" button when in new ui. Before it would still
try to press the button regardless if in old or new ui

Change-Id: I23d8f45975067b0a30240393af3a37e31a210c11
mr10.0
Nico Schedel 4 years ago
parent 79bf775964
commit 1fb71898df

@ -26,6 +26,14 @@ def logout_csc(driver):
def login_panel(driver):
driver.get(os.environ['CATALYST_SERVER'] + ":1443/logout")
driver.get(os.environ['CATALYST_SERVER'] + ":1443")
try:
driver.implicitly_wait(1)
driver.find_element_by_xpath('//*[@id="q-app"]/div/footer/div/button/span[2]/span').click()
driver.implicitly_wait(10)
except:
pass
finally:
driver.implicitly_wait(10)
driver.find_element_by_xpath('//*[@id="username"]').send_keys('administrator')
driver.find_element_by_xpath('//*[@id="password"]').send_keys('administrator')
driver.find_element_by_xpath('//*[@id="submit"]').click()

Loading…
Cancel
Save