@puppeteer/replay / Schema / 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))",
}
-
↳
WaitForExpressionStep
• Optional
assertedEvents: NavigationEvent
[]
• expression: string
• Optional
frame: FrameSelector
Defaults to main frame
• Optional
target: string
Defaults to main
• Optional
timeout: number
• type: WaitForExpression