@puppeteer/replay
- AssertedEvent
- AssertedEventType
- AssertionStep
- BaseStep
- ChangeStep
- ClickAttributes
- ClickStep
- CloseStep
- CustomStep
- CustomStepParams
- DoubleClickStep
- EmulateNetworkConditionsStep
- FrameSelector
- HoverStep
- Key
- KeyDownStep
- KeyUpStep
- NavigateStep
- NavigationEvent
- Pattern
- PointerButtonType
- PointerDeviceType
- ScrollElementStep
- ScrollPageStep
- ScrollStep
- Selector
- SelectorType
- SetViewportStep
- Step
- StepType
- StepWithFrame
- StepWithSelectors
- StepWithTarget
- Target
- UserFlow
- UserStep
- WaitForElementStep
- WaitForExpressionStep
- JSONStringifyExtension
- LighthouseRunnerExtension
- LighthouseStringifyExtension
- PuppeteerReplayStringifyExtension
- PuppeteerRunnerExtension
- PuppeteerRunnerOwningBrowserExtension
- PuppeteerStringifyExtension
- Runner
- RunnerExtension
- StringifyExtension
- assertAllStepTypesAreHandled
- createRunner
- formatAsJSLiteral
- formatJSONAsJS
- getSelectorType
- parse
- parseSourceMap
- parseStep
- selectorToPElementSelector
- stringify
- stringifyStep
- stripSourceMap
- validTimeout
Re-exports AssertedEvent
Re-exports AssertedEventType
Re-exports AssertionStep
Re-exports BaseStep
Re-exports ChangeStep
Re-exports ClickAttributes
Re-exports ClickStep
Re-exports CloseStep
Re-exports CustomStep
Re-exports CustomStepParams
Re-exports DoubleClickStep
Re-exports EmulateNetworkConditionsStep
Re-exports FrameSelector
Re-exports HoverStep
Re-exports Key
Re-exports KeyDownStep
Re-exports KeyUpStep
Re-exports NavigateStep
Re-exports NavigationEvent
Re-exports Pattern
Re-exports PointerButtonType
Re-exports PointerDeviceType
Re-exports ScrollElementStep
Re-exports ScrollPageStep
Re-exports ScrollStep
Re-exports Selector
Re-exports SelectorType
Re-exports SetViewportStep
Re-exports Step
Re-exports StepType
Re-exports StepWithFrame
Re-exports StepWithSelectors
Re-exports StepWithTarget
Re-exports Target
Re-exports UserFlow
Re-exports UserStep
Re-exports WaitForElementStep
Re-exports WaitForExpressionStep
Ƭ SourceMap: number
[]
The format is [version, [lineNo, length], [lineNo, length] ... [lineNo, length]].
• Const
maxTimeout: 30000
• Const
minTimeout: 1
• Const
mouseButtonMap: ReadonlyMap
<string
, "left"
| "middle"
| "right"
| "back"
| "forward"
>
• Const
pointerDeviceTypes: ReadonlySet
<string
>
• Const
typeableInputTypes: ReadonlySet
<string
>
▸ assertAllStepTypesAreHandled(s
): never
Name | Type |
---|---|
s |
never |
never
▸ createRunner(): Promise
<Runner
>
Promise
<Runner
>
▸ createRunner(flow
): Promise
<Runner
>
Name | Type |
---|---|
flow |
UserFlow |
Promise
<Runner
>
▸ createRunner(extension
): Promise
<Runner
>
Name | Type |
---|---|
extension |
RunnerExtension |
Promise
<Runner
>
▸ createRunner(flow
, extension
): Promise
<Runner
>
Name | Type |
---|---|
flow |
UserFlow |
extension |
RunnerExtension |
Promise
<Runner
>
▸ formatAsJSLiteral(content
): string
Name | Type |
---|---|
content |
string |
string
▸ formatJSONAsJS(json
, indent
): string
Copyright (c) 2020 The Chromium Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Name | Type |
---|---|
json |
unknown |
indent |
string |
string
▸ getSelectorType(selector
): SelectorType
Detects what type of a selector the string contains. For example,
aria/Label
is a SelectorType.ARIA.
Note that CSS selectors are special and usually don't require a prefix, therefore, SelectorType.CSS is the default type if other types didn't match.
Name | Type |
---|---|
selector |
string |
▸ parse(data
): UserFlow
Name | Type |
---|---|
data |
unknown |
▸ parseSourceMap(text
): SourceMap
| undefined
Extracts a source map from a text.
Name | Type |
---|---|
text |
string |
SourceMap
| undefined
▸ parseStep(step
, idx?
): Step
Name | Type |
---|---|
step |
unknown |
idx? |
number |
▸ selectorToPElementSelector(selector
): string
Converts a selector or an array of selector parts into a Puppeteer selector.
Name | Type |
---|---|
selector |
string | string [] |
string
See
https://pptr.dev/guides/query-selectors#p-elements
▸ stringify(flow
, opts?
): Promise
<string
>
Stringifes an entire recording. The following hooks are invoked with the flow
parameter containing the entire flow:
beforeAllSteps
(once)beforeEachStep
(per step)stringifyStep
(per step)afterEachStep
(per step)afterAllSteps
(once)
Name | Type |
---|---|
flow |
UserFlow |
opts? |
StringifyOptions |
Promise
<string
>
▸ stringifyStep(step
, opts?
): Promise
<string
>
Stringifes a single step. Only the following hooks are invoked with the flow
parameter as undefined:
beforeEachStep
stringifyStep
afterEachStep
Name | Type |
---|---|
step |
Step |
opts? |
StringifyOptions |
Promise
<string
>
▸ stripSourceMap(text
): string
Name | Type |
---|---|
text |
string |
string
▸ validTimeout(timeout
): boolean
Name | Type |
---|---|
timeout |
number |
boolean