Skip to content

Latest commit

 

History

History

api

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

@puppeteer/replay

@puppeteer/replay

Table of contents

References

Namespaces

Classes

Interfaces

Type Aliases

Variables

Functions

References

AssertedEvent

Re-exports AssertedEvent


AssertedEventType

Re-exports AssertedEventType


AssertionStep

Re-exports AssertionStep


BaseStep

Re-exports BaseStep


ChangeStep

Re-exports ChangeStep


ClickAttributes

Re-exports ClickAttributes


ClickStep

Re-exports ClickStep


CloseStep

Re-exports CloseStep


CustomStep

Re-exports CustomStep


CustomStepParams

Re-exports CustomStepParams


DoubleClickStep

Re-exports DoubleClickStep


EmulateNetworkConditionsStep

Re-exports EmulateNetworkConditionsStep


FrameSelector

Re-exports FrameSelector


HoverStep

Re-exports HoverStep


Key

Re-exports Key


KeyDownStep

Re-exports KeyDownStep


KeyUpStep

Re-exports KeyUpStep


NavigateStep

Re-exports NavigateStep


NavigationEvent

Re-exports NavigationEvent


Pattern

Re-exports Pattern


PointerButtonType

Re-exports PointerButtonType


PointerDeviceType

Re-exports PointerDeviceType


ScrollElementStep

Re-exports ScrollElementStep


ScrollPageStep

Re-exports ScrollPageStep


ScrollStep

Re-exports ScrollStep


Selector

Re-exports Selector


SelectorType

Re-exports SelectorType


SetViewportStep

Re-exports SetViewportStep


Step

Re-exports Step


StepType

Re-exports StepType


StepWithFrame

Re-exports StepWithFrame


StepWithSelectors

Re-exports StepWithSelectors


StepWithTarget

Re-exports StepWithTarget


Target

Re-exports Target


UserFlow

Re-exports UserFlow


UserStep

Re-exports UserStep


WaitForElementStep

Re-exports WaitForElementStep


WaitForExpressionStep

Re-exports WaitForExpressionStep

Type Aliases

SourceMap

Ƭ SourceMap: number[]

The format is [version, [lineNo, length], [lineNo, length] ... [lineNo, length]].

Defined in

stringify.ts:35

Variables

maxTimeout

Const maxTimeout: 30000

Defined in

SchemaUtils.ts:563


minTimeout

Const minTimeout: 1

Defined in

SchemaUtils.ts:562


mouseButtonMap

Const mouseButtonMap: ReadonlyMap<string, "left" | "middle" | "right" | "back" | "forward">

Defined in

SchemaUtils.ts:70


pointerDeviceTypes

Const pointerDeviceTypes: ReadonlySet<string>

Defined in

SchemaUtils.ts:64


typeableInputTypes

Const typeableInputTypes: ReadonlySet<string>

Defined in

SchemaUtils.ts:53

Functions

assertAllStepTypesAreHandled

assertAllStepTypesAreHandled(s): never

Parameters

Name Type
s never

Returns

never

Defined in

SchemaUtils.ts:48


createRunner

createRunner(): Promise<Runner>

Returns

Promise<Runner>

Defined in

Runner.ts:102

createRunner(flow): Promise<Runner>

Parameters

Name Type
flow UserFlow

Returns

Promise<Runner>

Defined in

Runner.ts:103

createRunner(extension): Promise<Runner>

Parameters

Name Type
extension RunnerExtension

Returns

Promise<Runner>

Defined in

Runner.ts:104

createRunner(flow, extension): Promise<Runner>

Parameters

Name Type
flow UserFlow
extension RunnerExtension

Returns

Promise<Runner>

Defined in

Runner.ts:105


formatAsJSLiteral

formatAsJSLiteral(content): string

Parameters

Name Type
content string

Returns

string

Defined in

JSONUtils.ts:111


formatJSONAsJS

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.

Parameters

Name Type
json unknown
indent string

Returns

string

Defined in

JSONUtils.ts:23


getSelectorType

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.

Parameters

Name Type
selector string

Returns

SelectorType

Defined in

SchemaUtils.ts:615


parse

parse(data): UserFlow

Parameters

Name Type
data unknown

Returns

UserFlow

Defined in

SchemaUtils.ts:571


parseSourceMap

parseSourceMap(text): SourceMap | undefined

Extracts a source map from a text.

Parameters

Name Type
text string

Returns

SourceMap | undefined

Defined in

stringify.ts:109


parseStep

parseStep(step, idx?): Step

Parameters

Name Type
step unknown
idx? number

Returns

Step

Defined in

SchemaUtils.ts:495


selectorToPElementSelector

selectorToPElementSelector(selector): string

Converts a selector or an array of selector parts into a Puppeteer selector.

Parameters

Name Type
selector string | string[]

Returns

string

See

https://pptr.dev/guides/query-selectors#p-elements

Defined in

SchemaUtils.ts:629


stringify

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)

Parameters

Name Type
flow UserFlow
opts? StringifyOptions

Returns

Promise<string>

Defined in

stringify.ts:45


stringifyStep

stringifyStep(step, opts?): Promise<string>

Stringifes a single step. Only the following hooks are invoked with the flow parameter as undefined:

  • beforeEachStep
  • stringifyStep
  • afterEachStep

Parameters

Name Type
step Step
opts? StringifyOptions

Returns

Promise<string>

Defined in

stringify.ts:79


stripSourceMap

stripSourceMap(text): string

Parameters

Name Type
text string

Returns

string

Defined in

stringify.ts:120


validTimeout

validTimeout(timeout): boolean

Parameters

Name Type
timeout number

Returns

boolean

Defined in

SchemaUtils.ts:567