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: