Merge branch 'zdy'
This commit is contained in:
@@ -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:
|
||||
@@ -184,7 +187,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:
|
||||
|
||||
Reference in New Issue
Block a user