CaptionController
Defined in: caption.ts:70
Methods
Section titled “Methods”end():
Promise<void>
Defined in: caption.ts:103
Hides the caption overlay and stops voiceover playback.
Always call this after every start().
Returns
Section titled “Returns”Promise<void>
start()
Section titled “start()”start():
Promise<void>
Defined in: caption.ts:81
Begins voiceover audio and shows the caption overlay.
Returns
Section titled “Returns”Promise<void>
Example
Section titled “Example”await captions.intro.start()await page.goto('/dashboard')await captions.intro.end()waitUntil()
Section titled “waitUntil()”waitUntil(
progress):Promise<void>
Defined in: caption.ts:98
Pauses execution until the voiceover audio reaches the given playback position.
Use this to time a page interaction to a specific moment in the narration — for example, clicking a button right as the voiceover mentions it.
Parameters
Section titled “Parameters”progress
Section titled “progress”string
Playback position as a percentage string, e.g. '50%'.
Returns
Section titled “Returns”Promise<void>
Example
Section titled “Example”await captions.intro.start()await captions.intro.waitUntil('70%') // wait until 70% of audio has playedawait page.locator('#cta').click() // then clickawait captions.intro.end()