Wait
Waiting is a synchronization technique that pauses or defers automated execution until a specified duration, condition, application state, or operation status is reached.
BDD in Action, Second Edition
Wait is a Serenity BDD waiting utility that pauses execution until an arbitrary function has completed or a supplied condition is met.
- How it is used
- Coordinates automated acceptance tests with asynchronous UI, backend, API, and event-driven application states.
- How deep it goes
- Explains predefined, fluent, and arbitrary-function waits with timeouts, polling, and encapsulation, but defers broader synchronization internals.
- Examples
- Uses transient login notifications, flight-search spinners, visible results, page titles, and file-processing functions.
- What you can do after
- Apply it via Serenity BDD, Selenium WebDriver, Page Objects, or Screenplay interactions to make asynchronous tests more reliable.
API Design Patterns
Waiting is an asynchronous-operation retrieval strategy that keeps a request open until the operation reaches a terminal state.
- How it is used
- Retrieves long-running-operation results through a request that remains open until completion.
- How deep it goes
- Defines the blocking-request behavior and contrasts its resource trade-off with client polling.
- Examples
- Uses chat-room creation, operation identifiers, WaitOperation, and a returned ChatRoom result.
- What you can do after
- Apply it via a custom WaitOperation method to receive a completed resource without client-side polling.
Also covered in
- Practical Automation with PowerShell: Effective scripting from the console to the cloud
- Software Testing with Generative AI
Related concepts
- ExpectedConditionsused by · ExpectedConditions is a Selenium utility class providing predefined predicates for common browser-state conditions.
- FluentWaitincludes · FluentWait is a Selenium wait class that supports dynamically configured polling, timeout, and exception-handling parameters through a fluent API.
- WaitUntilused by · WaitUntil is a Serenity BDD Screenplay interaction that pauses execution until a specified condition is satisfied.
- implicit waitincludes · An implicit wait is a WebDriver timeout policy that repeatedly searches for a page element until it appears or the timeout expires.
- interruptible waitincludes · A blocking wait operation that returns control when the waiting thread is interrupted.
Questions about wait
What is wait?
Waiting is a synchronization technique that pauses or defers automated execution until a specified duration, condition, application state, or operation status is reached.
Which Manning books explain wait?
BDD in Action, Second Edition and API Design Patterns.
What kinds of wait are there?
Kinds of wait include duration-based wait, FluentWait, implicit wait and interruptible wait.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

