fixed bug that caused us not to click ok in send to file
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user