liveBook · Manning

Notepad

As explained in BDD in Action, Second Edition

A notepad is an actor-associated store for retaining static or dynamically resolved information during Screenplay interactions.

A notepad is an actor-associated store for retaining initial data and recording information during Screenplay interactions. It supports both static values and dynamically resolved data. section 14.2.3 section 14.4

Use a notepad to:

  • Seed each actor with persona-specific data, such as traveler details generated from the actor’s name. section 14.2.3
  • Share information between activities by recording values of interest for later use in the scenario. section 14.2.3
  • Pass default data into parameterized tasks while allowing scenarios to override selected fields. section 15.1.6

Configure the actor with TakeNotes and a typed Notepad. When a task consumes notepad data, Serenity/JS exposes it through a QuestionAdapter so the same task can handle static, dynamic, or lazy-loaded values. section 14.2.3 section 15.1.6

Generated traveler details with scenario overrides

An actor receives a notepad containing TravelerDetails.of(actor.name). A valid sign-up task reads travelerDetails from the notepad. A negative scenario merges an email address such as smiths@example.org into the default details to simulate a duplicate account.

How BDD in Action, Second Edition covers it

How deep it goes
Explains typed initialization, dynamic access through QuestionAdapter, and partial overrides, without detailing Notepad internals.
Examples
Uses generated traveler profiles, sign-up workflows, and duplicate-email scenarios with partial data overrides.
What it assumes
Assumes familiarity with actors, abilities, tasks, and TypeScript data structures; establishes notepad usage through concrete traveler workflows.
What you can do after
Apply it via Serenity/JS to seed actors, retrieve scenario data, and vary reusable tasks without duplicating complete datasets.
How it connects
Connects actors, TakeNotes, Cast, Screenplay Pattern, QuestionAdapter, and parameterized tasks.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of BDD in Action, Second Edition. The section links point to the parts of the book it draws on.