fixed bug that caused us not to click ok in send to file

This commit is contained in:
2026-07-07 13:22:20 -05:00
parent 1f4555bff6
commit 0c264aaa9c

View File

@@ -146,8 +146,8 @@ def perform_export(dlg, ctrl, timeouts):
def dismiss_any_dialog(app, ctrl, log):
"""Try to find and dismiss any stale dialogs left from a previous failure."""
# Dismiss "Send to" confirmation dialog (OK)
w = _find_desktop_dialog("Send to")
# Dismiss "Send to" file saved confirmation dialog (OK)
w = _find_desktop_dialog(ctrl["saved_title"])
if w:
try:
_click_dialog_button(w, "OK", log)
@@ -202,10 +202,11 @@ def wait_for_export(app, ctrl, timeouts, log):
# Poll the entire desktop for the confirmation dialog.
# app.window() can miss it — the dialog may not be owned by the app.
# Use the exact saved_title to avoid matching the "Send To File Location" dialog.
deadline = time.time() + timeouts["progress_finish"]
saved_win = None
while time.time() < deadline:
saved_win = _find_desktop_dialog("Send to")
saved_win = _find_desktop_dialog(ctrl["saved_title"])
if saved_win is not None:
break
time.sleep(2)