TabsManager.py Added unit tests + documentation

This commit is contained in:
2025-12-07 15:42:48 +01:00
parent 05067515d6
commit fde2e85c92
11 changed files with 4375 additions and 317 deletions

View File

@@ -110,6 +110,14 @@ class Regex(AttrPredicate):
return re.match(self.value, actual) is not None
class And(AttrPredicate):
def __init__(self, *predicates):
super().__init__(predicates)
def validate(self, actual):
return all(p.validate(actual) for p in self.value)
class ChildrenPredicate(Predicate):
"""
Predicate given as a child of an element.
@@ -791,10 +799,6 @@ def find(ft, expected):
for element in elements_to_search:
all_matches.extend(_search_tree(element, expected))
# Raise error if nothing found
if not all_matches:
raise AssertionError(f"No element found for '{expected}'")
return all_matches