Merge "pytest-based tests fix login fixture"

This commit is contained in:
Zuul
2025-07-30 09:57:28 +00:00
committed by Gerrit Code Review
2 changed files with 3 additions and 1 deletions

View File

@@ -194,7 +194,7 @@ PluginGroup = [
ThemeGroup = [
cfg.StrOpt('project_name_xpath',
default='.//*[@class="context-project"]',
default='.//*[@class="context-project"]//ancestor::ul',
help='Default xpath for project name dropdown button'),
cfg.ListOpt('help_sequence',
default=['.//*[@class="dropdown user-menu"]',

View File

@@ -78,6 +78,8 @@ class Session:
self.project_name_xpath)
self.current_project = project_element.text
if self.current_project != project:
project_element = self.driver.find_element_by_xpath(
self.project_name_xpath)
project_element.click()
selection = project_element.find_element_by_xpath(
f'.//*[normalize-space()="{project}"]')