Исправления в компоненте навигационной панели

- Исправлена ошибка R1705 pylint: удален лишний 'else' после 'return' в методе click_sub_item
- Улучшена логика извлечения текста для элементов навигации:
  + node_texts = node_text.splitlines()
  + if len(node_texts) > 1:
  +     node_text = node_texts[1]
new_add_edit_user
Radislav 2025-12-08 07:34:22 +03:00
parent ef9d9c632a
commit 5a6d0054ba
1 changed files with 6 additions and 6 deletions

View File

@ -115,12 +115,12 @@ class NavigationPanelComponent(BaseComponent):
if found_loc:
if parent is None:
return found_loc
else:
root_texts = root_locator.locator(
f">div:nth-child({index + 1})"
).inner_text().splitlines()
if parent in root_texts:
return found_loc
root_texts = root_locator.locator(
f">div:nth-child({index + 1})"
).inner_text().splitlines()
if parent in root_texts:
return found_loc
# закрываем узел, если в нем ничего не нашли
if is_expanded: