From 84bf5f31ea0b932ce769de0cdaa5998dc185755f Mon Sep 17 00:00:00 2001 From: dat972 Date: Mon, 6 Jul 2026 23:00:32 -0500 Subject: [PATCH] reworked how we waited for select-> --- fccs_export.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/fccs_export.py b/fccs_export.py index 6b3d477..a79f864 100755 --- a/fccs_export.py +++ b/fccs_export.py @@ -131,10 +131,17 @@ def open_send_to_file(main, app, ctrl, timeouts): def perform_export(dlg, ctrl, timeouts): """Click Select -> then OK to start the export.""" - dlg.child_window(title=ctrl["select_btn_title"], class_name="Button").click() - time.sleep(timeouts["settle"]) + # Wait for the Select button to be ready — the dialog may still be + # populating its controls after appearing. + select_btn = dlg.child_window(title=ctrl["select_btn_title"], class_name="Button") + select_btn.wait("visible ready enabled", timeout=timeouts["dialog"]) + select_btn.click() - dlg.child_window(title=ctrl["ok_btn_title"], class_name="Button").click() + # Wait for the OK button to become ready — transferring files to the + # selected side can take a while on large drawers. + ok_btn = dlg.child_window(title=ctrl["ok_btn_title"], class_name="Button") + ok_btn.wait("visible ready enabled", timeout=timeouts["dialog"]) + ok_btn.click() def wait_for_export(app, ctrl, timeouts, log):