Skip to content

waygraph / frameContainsText

Function: frameContainsText() ​

frameContainsText(frameSelector, innerSelector, expected): Trait

Defined in: src/engine/trait/trait.ts:338

Passes when innerSelector's text inside frameSelector contains expected as a substring - the common QA shape for "the email says X somewhere" without needing to match the whole body verbatim (surrounding whitespace/markup in a real email template would otherwise break an exact-equality check).

Parameters ​

frameSelector ​

string

innerSelector ​

string

expected ​

string

Returns ​

Trait

Example ​

ts
Trait.frameContains("#preview-html", "body", "Please verify your account")

waygraph 0.18.3 (alpha) · Node 24+ · peer @playwright/test ^1.40.0 · syntax may change before 1.0: see what was removed