Skip to content

Latest commit

 

History

History
120 lines (67 loc) · 2.54 KB

Schema.WaitForExpressionStep.md

File metadata and controls

120 lines (67 loc) · 2.54 KB

@puppeteer/replay / Schema / WaitForExpressionStep

Interface: WaitForExpressionStep

Schema.WaitForExpressionStep

waitForExpression allows for a JavaScript expression to resolve to truthy value.

For example, the following step pauses for two seconds and then resolves to true allowing the replay to continue.

{
  "type": "waitForExpression",
  "expression": "new Promise(resolve => setTimeout(() => resolve(true),
2000))",
}

Hierarchy

Table of contents

Properties

Properties

assertedEvents

Optional assertedEvents: NavigationEvent[]

Inherited from

StepWithFrame.assertedEvents

Defined in

Schema.ts:64


expression

expression: string

Defined in

Schema.ts:293


frame

Optional frame: FrameSelector

Defaults to main frame

Inherited from

StepWithFrame.frame

Defined in

Schema.ts:78


target

Optional target: string

Defaults to main

Inherited from

StepWithFrame.target

Defined in

Schema.ts:71


timeout

Optional timeout: number

Inherited from

StepWithFrame.timeout

Defined in

Schema.ts:63


type

type: WaitForExpression

Overrides

StepWithFrame.type

Defined in

Schema.ts:292