Retry
Automatically re-running a failed test or action a limited number of times to absorb transient, non-deterministic failures.
What is Retry?
What is Retry?
Retry logic re-runs a failed test or action a set number of times before declaring a real failure, smoothing over transient hiccups like a momentary network blip. Used judiciously, retries improve signal reliability; used as a crutch, they mask genuine flakiness and let real defects hide behind a lucky second attempt. The healthier path is to fix the root cause of non-determinism—waiting, isolation, stable locators—so retries stay a safety margin rather than a coping mechanism. Playwright supports configurable retries and flags tests that only pass on retry as flaky.