Playwright 1.45 Released: A Clock API for Controlling Time
Playwright 1.45 introduced a Clock API for manipulating and controlling time in tests, a --fail-on-flaky-tests CLI option, directory uploads, and a ControlOrMeta modifier key.
Historical Archive. This article documents an event from 2024 and is preserved with its original date for reference. It is not current news, and details may have changed since publication.
What happened
Playwright 1.45 was released on June 24, 2024, according to the official GitHub release notes. Playwright is Microsoft's end-to-end web testing and automation framework, and the release focused on a major new API for time control along with test-runner refinements.
The Clock API
The headline feature was a new Clock API that lets tests manipulate and control time to verify time-related behavior. It covers common scenarios including testing with a predefined time, keeping consistent time and timers, monitoring inactivity, and ticking through time manually. Tests can install a clock at a fixed date, pause time at a specific moment, and fast-forward, for example to simulate a user closing and reopening a laptop lid, then assert the page state.
Test runner improvements
Playwright 1.45 added a --fail-on-flaky-tests CLI option that sets the exit code to 1 when any test is flaky, rather than passing when a failed test recovers on retry. It introduced a PLAYWRIGHT_FORCE_TTY environment variable to control whether reporters assume a live terminal, added respectGitIgnore options to control whether gitignored files are excluded when searching for tests, and exposed a timeout property to custom expect matchers.
Other additions
The release let setInputFiles upload a directory for webkitdirectory file inputs, added a cross-platform ControlOrMeta modifier key that maps to Meta on macOS and Control elsewhere, added an httpCredentials.send option to control when the Authorization header is sent, and added Chromium, Firefox and WebKit support on Ubuntu 24.04.
Why it mattered
The Clock API filled a long-standing gap in browser testing, giving developers a first-class way to test time-dependent behavior deterministically without brittle workarounds. Combined with the flaky-test and TTY controls, Playwright 1.45 made test suites both more capable and more reliable in CI.
Related on Skillo
See also: Playwright 1.35 and UI mode in VS Code.
Sources
Published date reflects the original event date (2024-06-24). This article is original Skillo editorial written from the sources above; facts were verified in September 2026.
Written by
Skillo Staff
0 Comments
Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.