Skip to content

feat: support capture() on voiceover - #45

Merged
cmorten merged 4 commits into
mainfrom
feat-support-capture-on-voiceover
Aug 9, 2026
Merged

feat: support capture() on voiceover#45
cmorten merged 4 commits into
mainfrom
feat-support-capture-on-voiceover

Conversation

@cmorten

@cmorten cmorten commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Issue

No issue.

Details

Supports the new capture() API for capturing screen reader output produced by arbitrary actions.

This enables seemless integration with Playwright, allowing Guidepup to associate spoken phrases and item text with interactions performed using Playwright APIs. The action’s result is returned alongside the captured screen reader output.

Example:

const capture = await screenReader.capture(() =>
  page.getByRole("button", { name: "Add to cart" }).click(),
);

expect(capture.spokenPhrase).toContain("Added to cart");

This paves the way for auto-instrumentation of Playwright tests where existing tests can be re-used to also allow assertions on screen reader output without explicit Guidepup commands.

This change also improves some of the types for exported Playwright test instances.

CheckList

  • Has been tested (where required).

@cmorten
cmorten merged commit 1b02fe3 into main Aug 9, 2026
31 of 32 checks passed
@cmorten
cmorten deleted the feat-support-capture-on-voiceover branch August 9, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant