Исправлена обработка текста элементов и упрощена логика в find_and_click_item

>>
>> Основные изменения в navbar_component.py:
>> 1. Удалена обработка многострочного текста из node_content
>>    - Убрано разбиение текста на строки (node_texts = node_text.splitlines())
>>    - Теперь используется полный текст элемента без извлечения второй строки
>>
>> 2. Упрощена логика условных операторов:
>>    - Удален ненужный else после return в строке 116
>>    - Код внутри else перенесен внутрь if с корректным отступом
new_add_edit_user
Radislav 2025-12-05 09:53:33 +03:00
parent ee502a7fa0
commit de735fb9fa
1 changed files with 3 additions and 0 deletions

View File

@ -51,6 +51,9 @@ class NavigationPanelComponent(BaseComponent):
node_content = node.locator('div.v-treeview-node__content')
if node_content.count() > 0:
node_text = node_content.first.inner_text().strip()
node_texts = node_text.splitlines()
if len(node_texts) > 1:
node_text = node_texts[1]
if item_name == node_text:
node_attr = node.get_attribute('class')
if "v-treeview-node--leaf" not in node_attr: