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):
|
def dismiss_any_dialog(app, ctrl, log):
|
||||||
"""Try to find and dismiss any stale dialogs left from a previous failure."""
|
"""Try to find and dismiss any stale dialogs left from a previous failure."""
|
||||||
# Dismiss "Send to" confirmation dialog (OK)
|
# Dismiss "Send to" file saved confirmation dialog (OK)
|
||||||
w = _find_desktop_dialog("Send to")
|
w = _find_desktop_dialog(ctrl["saved_title"])
|
||||||
if w:
|
if w:
|
||||||
try:
|
try:
|
||||||
_click_dialog_button(w, "OK", log)
|
_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.
|
# Poll the entire desktop for the confirmation dialog.
|
||||||
# app.window() can miss it — the dialog may not be owned by the app.
|
# 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"]
|
deadline = time.time() + timeouts["progress_finish"]
|
||||||
saved_win = None
|
saved_win = None
|
||||||
while time.time() < deadline:
|
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:
|
if saved_win is not None:
|
||||||
break
|
break
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|||||||
Reference in New Issue
Block a user