{"record":{"id":"cf0d53fcb47c8192","repo":"affaan-m/ECC","slug":"condition-not-met-within-timeout-s","errorCode":null,"errorMessage":"Condition not met within {timeout}s","messagePattern":"Condition not met within (.+?)s","errorType":"exception","errorClass":"TimeoutError","httpStatus":null,"severity":"error","filePath":"skills/windows-desktop-e2e/SKILL.md","lineNumber":175,"sourceCode":"        return spec\n\n    def wait_window(self, title, timeout=ACTION_TIMEOUT):\n        \"\"\"Wait for a new top-level window (dialogs, child windows).\"\"\"\n        dlg = Desktop(backend=\"uia\").window(title=title)\n        dlg.wait(\"visible\", timeout=timeout)\n        return dlg\n\n    def wait_until(self, fn, timeout=ACTION_TIMEOUT, interval=0.3):\n        \"\"\"Poll an arbitrary condition — use when UIA events are unreliable.\"\"\"\n        deadline = time.time() + timeout\n        while time.time() < deadline:\n            try:\n                if fn():\n                    return True\n            except Exception:\n                pass\n            time.sleep(interval)\n        raise TimeoutError(f\"Condition not met within {timeout}s\")\n\n    # --- Actions ---\n\n    def click(self, spec):\n        self.wait_visible(spec)\n        spec.click_input()\n\n    def type_text(self, spec, text):\n        self.wait_visible(spec)\n        ctrl = spec.wrapper_object()\n        try:\n            ctrl.set_edit_text(text)\n        except Exception as e:\n            # Qt 5.x fallback: UIA Value Pattern may be incomplete\n            import sys, pywinauto.keyboard as kb\n            print(f\"[windows-desktop-e2e] set_edit_text failed ({e}), using keyboard fallback\", file=sys.stderr)\n            ctrl.click_input()\n            kb.send_keys(\"^a\")","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/affaan-m/ECC/blob/06c5e118c4d3e6c3b7f9445f973a2194c82de193/skills/windows-desktop-e2e/SKILL.md#L157-L193","documentation":"Polling helper in the Windows desktop E2E pattern: wait_until repeatedly evaluates a condition function until the deadline, swallowing per-iteration exceptions; when time runs out without the condition holding, it raises this timeout error naming the waited seconds.","triggerScenarios":"Triggered when SKILL.md rejects the current invocation: Condition not met within <value>s","commonSituations":"Occurs while running skills/windows-desktop-e2e/SKILL.md with invalid arguments, missing flags, or a failing external dependency; the guard at skills/windows-desktop-e2e/SKILL.md:175 aborts the command with this message.","solutions":["Increase the timeout within the allowed range or fix the underlying condition, then retry."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"06c5e118c4d3e6c3b7f9445f973a2194c82de193","analyzedAt":"2026-08-18T11:27:13.915Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}