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.
Related concepts
- ExpectedConditionsused by · ExpectedConditions is a Selenium utility class providing predefined predicates for common browser-state conditions.
- WaitUntilused by · WaitUntil is a Serenity BDD Screenplay interaction that pauses execution until a specified condition is satisfied.
- FluentWaitincludes · FluentWait is a Selenium wait class that supports dynamically configured polling, timeout, and exception-handling parameters through a fluent API.
- pollingalternative to · Polling is the repeated checking or querying of a resource, system, or condition, often at intervals, to detect data, events, or state changes.
- implementation detailkind of · An implementation detail is an internal design choice, representation, or mechanism that is not part of a software component’s externally observable behavior or contract.
- WaitGroup.Waitimplemented by · WaitGroup.Wait is a method that blocks until the associated wait group's counter reaches zero.
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.

