From 5a6d0054baa322c9b41af9d5fb04d2180671b55c Mon Sep 17 00:00:00 2001 From: Radislav Date: Mon, 8 Dec 2025 07:34:22 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2=20=D0=BA=D0=BE=D0=BC=D0=BF?= =?UTF-8?q?=D0=BE=D0=BD=D0=B5=D0=BD=D1=82=D0=B5=20=D0=BD=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=B3=D0=B0=D1=86=D0=B8=D0=BE=D0=BD=D0=BD=D0=BE=D0=B9=20=D0=BF?= =?UTF-8?q?=D0=B0=D0=BD=D0=B5=D0=BB=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Исправлена ошибка R1705 pylint: удален лишний 'else' после 'return' в методе click_sub_item - Улучшена логика извлечения текста для элементов навигации: + node_texts = node_text.splitlines() + if len(node_texts) > 1: + node_text = node_texts[1] --- components/navbar_component.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/components/navbar_component.py b/components/navbar_component.py index 1e0a96d..9a8f99a 100644 --- a/components/navbar_component.py +++ b/components/navbar_component.py @@ -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: