fix: normalize native editor handles before UIA calls

This commit is contained in:
阿白叔 committed 2026-11-02 22:36:23 +08:00
1 parent 1f69480ed8
commit bb98fe66dd
2 files changed
+31 -1

No files matched your search

+1 -1
View File
@@ -275,7 +275,7 @@ def _probe_add_dialog_impl(app, job, desktop, owned_pids, root, *, library=None)
for hwnd in desktop.EnumDesktopWindows():
if (win32process.GetWindowThreadProcessId(hwnd)[1] in owned_pids
and win32gui.IsWindowVisible(hwnd) and win32gui.GetWindowText(hwnd) == title):
return hwnd
return int(hwnd)
return None
def await_window(title):
while time.monotonic() < deadline: