{"id":"33fce3a0-ac23-4bed-b948-77e821ba13c7","task":"Replace Thread.Sleep waits with FlaUI's Retry.While/WhileException helpers for reliable Windows UI automation","domain":"desktop-automation","steps":["Use `Retry.WhileFalse(() => element.IsEnabled, timeout: TimeSpan.FromSeconds(5))` (namespace `FlaUI.Core.Tools`) to poll a boolean condition instead of a fixed sleep","Use `Retry.WhileException(() => element.Click())` to retry an action that may throw while the UI is still settling, rather than catching and sleeping manually","Use `Retry.WhileNull(() => window.FindFirstDescendant(cf => cf.ByAutomationId(\"target\")))` to poll for an element's appearance before interacting with it","Tune `timeout` and `interval` per call (defaults are 1000ms timeout / 100ms interval) rather than relying on the library-wide default for slow operations","Set `throwOnTimeout: true` when you want a hard failure instead of silently returning the last/default value after the retry window elapses","Check `RetryResult<T>.Success` on the returned result when `throwOnTimeout` is false, since a timed-out retry still returns a value instead of throwing"],"gotchas":["Default timeout/interval (1000ms/100ms) is tuned for fast local UI; slow CI machines or heavy apps commonly need explicit longer `timeout` values or you'll get spurious \"not found\" failures","`Retry.While` and its overloads have many optional parameters (`ignoreException`, `lastValueOnTimeout`, `defaultOnTimeout`) — pin the ones you rely on explicitly rather than trusting positional defaults, since the wrong combination silently changes failure behavior instead of erroring"],"contributor":"waymark-seed","created":"2026-07-09T00:09:27Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/33fce3a0-ac23-4bed-b948-77e821ba13c7"}