ver Mar7th

updated instructions and set-up configs
This commit is contained in:
David Chang
2024-03-07 16:54:06 +08:00
parent 054e016aff
commit d6cd0936b3
11 changed files with 121 additions and 20 deletions

View File

@@ -17,6 +17,9 @@ import difflib
from .utils import _match_record, _match_value_to_rule
import logging
logger = logging.getLogger("desktopenv.metric.general")
def check_include_exclude(result: str, rules: Dict[str, List[str]]) -> float:
if result is None:
@@ -166,7 +169,7 @@ def check_accessibility_tree(result: str, rules: List[Dict[str, Any]]) -> float:
raise ValueError("At least one of xpath and selectors is required")
if len(elements) == 0:
print("no elements")
logger.info("No elements: %s", r["xpath"] if "xpath" in r else r["selectors"])
return 0.
if "text" in r: