feat: complete native BOM and Harness execution acceptance

This commit is contained in:
阿白叔 committed 2026-11-12 19:21:55 +08:00
1 parent 4f8fbd7806
commit 65438cb7e5
234 files changed
+24402 -865

No files matched your search

+3 -1
View File
@@ -76,7 +76,7 @@ class WindowDriver:
time.sleep(.2)
raise TimeoutError('Application main window not found')
def find(self, text=None, *, kind=None, automation_id=None, window=None):
def find(self, text=None, *, kind=None, automation_id=None, window=None, optional=False):
root = window or self.main()
# Do not recursively enumerate virtual Qt table cells through UIA.
def walk(parent, depth=0):
@@ -94,6 +94,8 @@ class WindowDriver:
and (automation_id is None or c.element_info.automation_id == automation_id
or c.element_info.automation_id.endswith('.' + automation_id))
and c.is_visible()]
if not matches and optional:
return None
if len(matches) != 1:
raise LookupError(f'Expected one {text!r}/{automation_id!r}, got {len(matches)}')
return matches[0]