Skip to content

waygraph / disabled

Function: disabled() ​

disabled(selector): Trait

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

Passes when at least one element matching selector is currently disabled - a submit button greyed out until required fields are filled, a "Save" not yet re-enabled after a pending edit. A real, nameable feature state, not just static content or an action's result. Uses .first() for the same reason visible does. A point-in-time read via Playwright's own isDisabled() - no wait built in, so pair it with Trait.visible (or rely on verify's own natural timing right after resolve) if the element itself might not be on the page yet.

Parameters ​

selector ​

string

Returns ​

Trait

Example ​

ts
Trait.disabled(CheckoutSel.submitButton)

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