Skip to main content
Puppeteer driver session and generated remote Puppeteer API classes. Entrypoint source: sdk/src/puppeteer.ts
import { ... } from '@bctrl/sdk/puppeteer';

Export Index

ExportKindSourceNotes
BrowserContextEventsinterfacesdk/src/drivers/puppeteer/types.tsBrowserContextEvents - maps event names to their payload types.
BrowserEventsinterfacesdk/src/drivers/puppeteer/types.tsBrowserEvents - maps event names to their payload types.
ElementHandleFactoryForJSHandletypesdk/src/drivers/puppeteer/generated/js-handle.tsFactory function to create ElementHandle instances (for asElement).
ElementHandleFactoryLocaltypesdk/src/drivers/puppeteer/generated/locator.tsFactory function for creating element handles (uses SDK type)
EvaluateFunctypesdk/src/drivers/puppeteer/types.ts-
Handlertypesdk/src/drivers/puppeteer/event-emitter.tsHandler function type for event listeners.
HTTPResponseDataFactorytypesdk/src/drivers/puppeteer/generated/http-response.tsFactory function type for creating HTTPResponse instances from serialized data. Used when the full response data is already available.
HTTPResponseFactorytypesdk/src/drivers/puppeteer/generated/http-response.tsFactory function type for creating HTTPResponse instances from response ID. Used when the full response data needs to be fetched lazily.
isSerializedHTTPResponsefunctionsdk/src/drivers/puppeteer/generated/http-response.tsType guard to check if a value is a serialized HTTPResponse.
isSerializedJSHandlefunctionsdk/src/drivers/puppeteer/generated/js-handle.tsType guard for serialized JSHandle responses.
JSHandleFactorytypesdk/src/drivers/puppeteer/generated/js-handle.tsFactory function to create new JSHandle instances.
JSHandleRpcSendertypesdk/src/drivers/puppeteer/generated/js-handle.tsRPC sender function type for JSHandle operations.
LocatorFactorytypesdk/src/drivers/puppeteer/generated/locator.tsFactory function for creating locators
LocatorMappertypesdk/src/drivers/puppeteer/generated/locator.tsMapper function for map()
LocatorPredicatetypesdk/src/drivers/puppeteer/generated/locator.tsPredicate function for filter()
PageEventsinterfacesdk/src/drivers/puppeteer/types.tsPageEvents - maps event names to their payload types.
ProtocolErrorclasssdk/src/drivers/puppeteer/errors.tsProtocolError is thrown when a CDP protocol error occurs.
PuppeteerActionOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerAutofillDatatypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerBoundingBoxtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerBoxModeltypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerBrowserContextEventtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerBrowserContextOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerBrowserEventtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerClickOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerClipRegiontypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerConsoleMessagetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerConsoleMessageLocationtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerConsoleMessageTypetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerContinueRequestOverridestypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCookietypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCookieDatatypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCookiePartitionKeytypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCookiePrioritytypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCookieSameSitetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCookieSourceSchemetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCoverageEntrytypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCoverageRangetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCreditCardtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCSSCoverageOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerDeleteCookiesRequesttypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerDevicetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerDialogtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerDialogTypetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerDownloadBehaviortypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerDownloadPolicytypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerDragDatatypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerDragDataItemtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerElementHandleinterfacesdk/src/drivers/puppeteer/types.ts-
PuppeteerErrorclasssdk/src/drivers/puppeteer/errors.tsBase error class for all Puppeteer errors.
PuppeteerErrorCodetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerEvalAllFunctiontypesdk/src/drivers/puppeteer/types.ts-
PuppeteerEvalFunctiontypesdk/src/drivers/puppeteer/types.ts-
PuppeteerEvaluateFunctiontypesdk/src/drivers/puppeteer/types.ts-
PuppeteerEventEmitterclasssdk/src/drivers/puppeteer/event-emitter.tsThe EventEmitter class that many Puppeteer classes extend. This provides a familiar event-driven interface for handling browser events like page load, console messages, dialogs, network requests, etc.
PuppeteerEventTypetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerFrametypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerFrameAddScriptTagOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerFrameAddStyleTagOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerGeolocationtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerGotoOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerHTTPRequesttypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerHTTPResponsetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerIdleOverridestypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerImageFormattypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerInitiatortypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerInitiatorTypetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerInterceptResolutionActiontypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerInterceptResolutionStatetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerJSCoverageEntrytypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerJSCoverageOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerKeyboardTypeOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerKeyDownOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerKeyInputtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerKeyPressOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerLocatorClickOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerLocatorScrollOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerMediaFeaturetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerMouseButtontypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerMouseClickOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerMouseMoveOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerMouseOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerMouseWheelOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerNetworkConditionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerOffsettypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerPageinterfacesdk/src/drivers/puppeteer/types.ts-
PuppeteerPageEventtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerPaperFormattypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerPDFMargintypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerPDFOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerPermissiontypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerPointtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerReloadOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerRemoteAddresstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerRemoteObjecttypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerRemoteObjectSubtypetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerRemoteObjectTypetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerResourceTimingtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerResourceTypetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerResponseForRequesttypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerScreenshotCliptypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerScreenshotOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerSecurityDetailstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerSelectOptiontypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerSelectValuetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerSerializedAXNodeinterfacepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerSerializedElementtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerSessionclasssdk/src/drivers/puppeteer/session.ts-
PuppeteerSnapshotOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerTargettypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerTargetFiltertypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerTargetTypetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerTouchHandletypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerTracingOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerViewporttypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerVisibilityOptiontypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerVisionDeficiencytypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWaitForNavigationOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWaitForNetworkIdleOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWaitForOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWaitForSelectorOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWaitForTargetOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWaitUntiltypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWaitUntilOptiontypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWebWorkertypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWindowBoundstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWindowStatetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
RemoteBaseclasssdk/src/drivers/puppeteer/remote-base.tsBase class for remote Puppeteer objects. Handles common patterns like closed-state checking and RPC wrapping.
RemoteComponentBaseclasssdk/src/drivers/puppeteer/remote-base.tsBase class for remote objects that don’t have an ID. Used for nested components like Mouse, Keyboard that operate on their parent.
RemotePuppeteerAccessibilityclasssdk/src/drivers/puppeteer/generated/accessibility.tsRemotePuppeteerAccessibility - Remote Puppeteer Accessibility API over RPC.
RemotePuppeteerBrowserclasssdk/src/drivers/puppeteer/generated/browser.tsRemotePuppeteerBrowser - Remote Puppeteer Browser API over RPC.
RemotePuppeteerBrowserContextclasssdk/src/drivers/puppeteer/generated/browser-context.tsRemotePuppeteerBrowserContext - Remote Puppeteer BrowserContext API over RPC.
RemotePuppeteerConsoleMessageclasssdk/src/drivers/puppeteer/generated/console-message.tsRemotePuppeteerConsoleMessage - Remote Puppeteer ConsoleMessage API over RPC.
RemotePuppeteerCoverageclasssdk/src/drivers/puppeteer/generated/coverage.tsRemotePuppeteerCoverage - Remote Puppeteer Coverage API over RPC.
RemotePuppeteerDialogclasssdk/src/drivers/puppeteer/generated/dialog.tsRemotePuppeteerDialog - Remote Puppeteer Dialog API over RPC.
RemotePuppeteerElementHandleclasssdk/src/drivers/puppeteer/generated/element-handle.tsRemotePuppeteerElementHandle - Remote Puppeteer ElementHandle API over RPC.
RemotePuppeteerFileChooserclasssdk/src/drivers/puppeteer/generated/file-chooser.tsRemotePuppeteerFileChooser - Remote Puppeteer FileChooser API over RPC.
RemotePuppeteerFrameclasssdk/src/drivers/puppeteer/generated/frame.tsRemotePuppeteerFrame - Remote Puppeteer Frame API over RPC.
RemotePuppeteerHTTPRequestclasssdk/src/drivers/puppeteer/generated/http-request.tsRemotePuppeteerHTTPRequest - Remote Puppeteer HTTPRequest API over RPC.
RemotePuppeteerHTTPResponseclasssdk/src/drivers/puppeteer/generated/http-response.tsRemotePuppeteerHTTPResponse - Remote Puppeteer HTTPResponse API over RPC.
RemotePuppeteerJSHandleclasssdk/src/drivers/puppeteer/generated/js-handle.tsRemotePuppeteerJSHandle - Remote Puppeteer JSHandle API over RPC.
RemotePuppeteerKeyboardclasssdk/src/drivers/puppeteer/generated/keyboard.tsRemotePuppeteerKeyboard - Remote Puppeteer Keyboard API over RPC.
RemotePuppeteerLocatorclasssdk/src/drivers/puppeteer/generated/locator.tsRemotePuppeteerLocator - Remote Puppeteer Locator API over RPC.
RemotePuppeteerMouseclasssdk/src/drivers/puppeteer/generated/mouse.tsRemotePuppeteerMouse - Remote Puppeteer Mouse API over RPC.
RemotePuppeteerPageclasssdk/src/drivers/puppeteer/generated/page.tsRemotePuppeteerPage - Remote Puppeteer Page API over RPC.
RemotePuppeteerTargetclasssdk/src/drivers/puppeteer/generated/target.tsRemotePuppeteerTarget - Remote Puppeteer Target API over RPC.
RemotePuppeteerTouchHandleclasssdk/src/drivers/puppeteer/generated/touchscreen.tsRemotePuppeteerTouchHandle - Represents a single touch point. Created by Touchscreen.touchStart().
RemotePuppeteerTouchscreenclasssdk/src/drivers/puppeteer/generated/touchscreen.tsRemotePuppeteerTouchscreen - Remote Puppeteer Touchscreen API over RPC.
RemotePuppeteerTracingclasssdk/src/drivers/puppeteer/generated/tracing.tsRemotePuppeteerTracing - Remote Puppeteer Tracing API over RPC.
RemotePuppeteerWebWorkerclasssdk/src/drivers/puppeteer/generated/web-worker.tsRemotePuppeteerWebWorker - Remote Puppeteer WebWorker API over RPC.
SerializedHTTPRequestinterfacesdk/src/drivers/puppeteer/generated/http-request.tsSerialized HTTPRequest data received from the server.
SerializedJSHandleinterfacesdk/src/drivers/puppeteer/generated/js-handle.tsSerialized JSHandle response from backend.
SerializedTargetInfointerfacesdk/src/drivers/puppeteer/generated/target.tsSerialized target info from the backend.
SnapshotOptionsinterfacesdk/src/drivers/puppeteer/generated/accessibility.tsOptions for SDK method. Wraps PuppeteerSnapshotOptions with SDK-friendly types.
TargetFactoriesinterfacesdk/src/drivers/puppeteer/generated/target.tsFactory functions for creating related objects. These are passed in to avoid circular dependencies.
TouchHandleinterfacesdk/src/drivers/puppeteer/types.ts-
UnsupportedOperationclasssdk/src/drivers/puppeteer/errors.tsUnsupportedOperation is thrown when an operation is not supported.

Classes

ProtocolError

Source: sdk/src/drivers/puppeteer/errors.ts
class ProtocolError extends PuppeteerError
ProtocolError is thrown when a CDP protocol error occurs.

Constructor

new (message?: string, code?: number, originalMessage?: string)

Properties

NameTypeNotes
codenumberThe original CDP error code, if available.
originalMessagestringThe original CDP error message, if available.

PuppeteerError

Source: sdk/src/drivers/puppeteer/errors.ts
class PuppeteerError extends Error
Base error class for all Puppeteer errors.

Constructor

new (message?: string)

PuppeteerEventEmitter

Source: sdk/src/drivers/puppeteer/event-emitter.ts
class PuppeteerEventEmitter
The EventEmitter class that many Puppeteer classes extend. This provides a familiar event-driven interface for handling browser events like page load, console messages, dialogs, network requests, etc.

Methods

emit
Emit an event, calling all registered handlers. This method is typically used internally by Puppeteer classes to dispatch events. Users rarely need to call this directly.
emit<Key extends keyof Events>(type: Key, event: Events[Key]): boolean
listenerCount
Get the count of listeners for a specific event type.
listenerCount<Key extends keyof Events>(type: Key): number
off
Remove an event listener. If handler is provided, only that specific listener is removed. If handler is not provided, all listeners for that event type are removed.
off<Key extends keyof Events>(type: Key, handler?: Handler<Events[Key]>): this
on
Bind an event listener to fire when an event occurs.
on<Key extends keyof Events>(type: Key, handler: Handler<Events[Key]>): this
once
Bind an event listener that will fire only once. After the handler is called once, it is automatically removed.
once<Key extends keyof Events>(type: Key, handler: Handler<Events[Key]>): this
removeAllListeners
Remove all listeners. If type is provided, only listeners for that event type are removed. If type is not provided, all listeners for all event types are removed.
removeAllListeners<Key extends keyof Events>(type?: Key): this

PuppeteerSession

Source: sdk/src/drivers/puppeteer/session.ts
class PuppeteerSession extends BaseSession<RemotePuppeteerPage, PuppeteerScriptPage>

Constructor

new (sessionId: string, hostId: string, baseUrl: string, options?: { apiKey?: string; defaultContextId?: string; defaultPageId?: string; storage?: string })

Properties

NameTypeNotes
browserRemotePuppeteerBrowsergetter • Get the Puppeteer-style browser instance.
contextPuppeteerContextgetter • Context for multi-page management (like stagehand.context).
pageRemotePuppeteerPagegetter • Get the default page (Puppeteer-style).

RemoteBase

Source: sdk/src/drivers/puppeteer/remote-base.ts
class RemoteBase
Base class for remote Puppeteer objects. Handles common patterns like closed-state checking and RPC wrapping.

Constructor

new (id: string, sendRpc: SimpleRpcSender)

Properties

NameTypeNotes
isClosedbooleangetter • Check if this object has been closed/disposed.

RemoteComponentBase

Source: sdk/src/drivers/puppeteer/remote-base.ts
class RemoteComponentBase
Base class for remote objects that don’t have an ID. Used for nested components like Mouse, Keyboard that operate on their parent.

Constructor

new (sendRpc: SimpleRpcSender)

Properties

NameTypeNotes
isClosedbooleangetter • Check if this object has been closed/disposed.

RemotePuppeteerAccessibility

Source: sdk/src/drivers/puppeteer/generated/accessibility.ts
class RemotePuppeteerAccessibility extends RemoteComponentBase
RemotePuppeteerAccessibility - Remote Puppeteer Accessibility API over RPC.

Constructor

new (sendRpc: SimpleRpcSender)

Methods

snapshot
Captures the current state of the accessibility tree.
snapshot(options?: SnapshotOptions): Promise<PuppeteerSerializedAXNode | null>

RemotePuppeteerBrowser

Source: sdk/src/drivers/puppeteer/generated/browser.ts
class RemotePuppeteerBrowser extends PuppeteerEventEmitter<BrowserEvents>
RemotePuppeteerBrowser - Remote Puppeteer Browser API over RPC.

Constructor

new (sendRpc: SimpleRpcSender, createPage: (pageId: string) => RemotePuppeteerPage, createContext: (contextId: string, isDefault: boolean) => RemotePuppeteerBrowserContext)

Properties

NameTypeNotes
isConnectedbooleangetter • Whether the browser is connected.

Methods

browserContexts
Get all browser contexts.
browserContexts(): RemotePuppeteerBrowserContext[]
close
Close the browser.
close(): Promise<void>
cookies
Gets cookies from the default browser context.
cookies(...urls: string[]): Promise<PuppeteerCookie[]>
createBrowserContext
Create a new browser context.
createBrowserContext(options?: PuppeteerBrowserContextOptions): Promise<RemotePuppeteerBrowserContext>
defaultBrowserContext
Get the default browser context.
defaultBrowserContext(): RemotePuppeteerBrowserContext
deleteCookie
Deletes cookies from the default browser context.
deleteCookie(...cookies: PuppeteerCookie[]): Promise<void>
deleteMatchingCookies
Deletes cookies matching the filter criteria from the default browser context.
deleteMatchingCookies(...filters: PuppeteerDeleteCookiesRequest[]): Promise<void>
disconnect
Disconnect from the browser (without closing it).
disconnect(): void
getWindowBounds
Gets the bounds of a browser window.
getWindowBounds(windowId: number): Promise<PuppeteerWindowBounds>
installExtension
Installs a browser extension.
installExtension(path: string): Promise<string>
newPage
Create a new page in the default browser context.
newPage(options?: { timeout?: number }): Promise<RemotePuppeteerPage>
pages
Get all open pages.
pages(includeAll?: boolean): Promise<RemotePuppeteerPage[]>
process
Get browser process info (if available).
process(): Promise<{ pid: number } | null>
setCookie
Sets cookies in the default browser context.
setCookie(...cookies: PuppeteerCookieData[]): Promise<void>
setWindowBounds
Sets the bounds of a browser window.
setWindowBounds(windowId: number, bounds: PuppeteerWindowBounds): Promise<void>
target
Gets the browser target.
target(): Promise<PuppeteerTarget>
targets
Gets all active targets inside the browser.
targets(): Promise<PuppeteerTarget[]>
uninstallExtension
Uninstalls a browser extension.
uninstallExtension(id: string): Promise<void>
userAgent
Get the browser’s user agent.
userAgent(): Promise<string>
version
Get the browser version.
version(): Promise<string>
waitForTarget
Wait for a target matching the filter.
waitForTarget(filter: PuppeteerTargetFilter, options?: PuppeteerWaitForTargetOptions): Promise<PuppeteerTarget>
wsEndpoint
Get the WebSocket endpoint for the browser.
wsEndpoint(): Promise<string>

RemotePuppeteerBrowserContext

Source: sdk/src/drivers/puppeteer/generated/browser-context.ts
class RemotePuppeteerBrowserContext extends PuppeteerEventEmitter<BrowserContextEvents>
RemotePuppeteerBrowserContext - Remote Puppeteer BrowserContext API over RPC.

Constructor

new (sendRpc: SimpleRpcSender, options: { contextId: string; isDefault?: boolean }, createPage: (pageId: string) => RemotePuppeteerPage)

Properties

NameTypeNotes
closedbooleangetter • Whether this context has been closed.
idstringgetter • Get the context ID.
isDefaultbooleangetter • Whether this is the default context.

Methods

clearPermissionOverrides
Clears all permission overrides for this browser context.
clearPermissionOverrides(): Promise<void>
close
Close this browser context.
close(): Promise<void>
cookies
Gets all cookies in this browser context.
cookies(...urls: string[]): Promise<PuppeteerCookie[]>
deleteCookie
Deletes cookies from this browser context.
deleteCookie(...cookies: PuppeteerCookie[]): Promise<void>
deleteMatchingCookies
Deletes cookies matching the filter criteria from this browser context.
deleteMatchingCookies(...filters: PuppeteerDeleteCookiesRequest[]): Promise<void>
markClosed
Mark this context as closed (internal use).
markClosed(): void
newPage
Creates a new page in this browser context.
newPage(options?: { timeout?: number }): Promise<RemotePuppeteerPage>
overridePermissions
Grants this browser context the given permissions within the given origin.
overridePermissions(origin: string, permissions: PuppeteerPermission[]): Promise<void>
pages
Gets a list of all open pages inside this browser context.
pages(includeAll?: boolean): Promise<RemotePuppeteerPage[]>
setCookie
Sets cookies in this browser context.
setCookie(...cookies: PuppeteerCookieData[]): Promise<void>
targets
Gets all active targets inside this browser context.
targets(): Promise<PuppeteerTarget[]>

RemotePuppeteerConsoleMessage

Source: sdk/src/drivers/puppeteer/generated/console-message.ts
class RemotePuppeteerConsoleMessage
RemotePuppeteerConsoleMessage - Remote Puppeteer ConsoleMessage API over RPC.

Constructor

new (messageData: PuppeteerConsoleMessage)

Methods

args
An array of arguments passed to the console function call.
args(): unknown[]
location
The location of the console message.
location(): PuppeteerConsoleMessageLocation
stackTrace
The array of locations on the stack of the console message.
stackTrace(): PuppeteerConsoleMessageLocation[]
text
The text of the console message.
text(): string
type
The type of the console message.
type(): PuppeteerConsoleMessageType

RemotePuppeteerCoverage

Source: sdk/src/drivers/puppeteer/generated/coverage.ts
class RemotePuppeteerCoverage
RemotePuppeteerCoverage - Remote Puppeteer Coverage API over RPC.

Constructor

new (sendRpc: SimpleRpcSender)

Methods

startCSSCoverage
Starts CSS coverage.
startCSSCoverage(options?: PuppeteerCSSCoverageOptions): Promise<void>
startJSCoverage
Starts JavaScript coverage.
startJSCoverage(options?: PuppeteerJSCoverageOptions): Promise<void>
stopCSSCoverage
Stops CSS coverage and returns coverage reports for all stylesheets.
stopCSSCoverage(): Promise<PuppeteerCoverageEntry[]>
stopJSCoverage
Stops JavaScript coverage and returns coverage reports for all scripts.
stopJSCoverage(): Promise<PuppeteerJSCoverageEntry[]>

RemotePuppeteerDialog

Source: sdk/src/drivers/puppeteer/generated/dialog.ts
class RemotePuppeteerDialog
RemotePuppeteerDialog - Remote Puppeteer Dialog API over RPC.

Constructor

new (sendRpc: SimpleRpcSender, dialogData: PuppeteerDialog)

Methods

accept
Accept the dialog. For prompt dialogs, optionally provide text to enter.
accept(promptText?: string): Promise<void>
defaultValue
Returns the default value of the prompt, or empty string if not a prompt.
defaultValue(): string
dismiss
Dismiss the dialog.
dismiss(): Promise<void>
message
The message displayed in the dialog.
message(): string
type
The type of the dialog (alert, confirm, prompt, beforeunload).
type(): PuppeteerDialogType

RemotePuppeteerElementHandle

Source: sdk/src/drivers/puppeteer/generated/element-handle.ts
class RemotePuppeteerElementHandle extends RemoteBase
RemotePuppeteerElementHandle - Remote Puppeteer ElementHandle API over RPC.

Constructor

new (id: string, sendRpc: SimpleRpcSender, createElementHandle: (handleId: string) => RemotePuppeteerElementHandle, createFrame: (frameId: string) => RemotePuppeteerFrame, createLocator: (handleId: string) => RemotePuppeteerLocator, createTouchHandle: (touchId: string) => TouchHandle)

Properties

NameTypeNotes
handleIdstringThe handle ID (alias for id, for compatibility).

Methods

$
Query for a child element.
$(selector: string): Promise<RemotePuppeteerElementHandle | null>
$$
Query for all matching child elements.
$$(selector: string): Promise<RemotePuppeteerElementHandle[]>
$$eval
Evaluate a function on all children matching the selector.
$$eval<T = unknown>(selector: string, pageFunction: string | ((elements: Element[], ...args: unknown[]) => T | Promise<T>), ...args: unknown[]): Promise<T>
$eval
Evaluate a function on the first child matching the selector.
$eval<T = unknown>(selector: string, pageFunction: string | ((element: Element, ...args: unknown[]) => T | Promise<T>), ...args: unknown[]): Promise<T>
autofill
Test if the form is compatible with browser autofill. Currently supports credit card autofill in Chrome headless/headful only.
autofill(data: PuppeteerAutofillData): Promise<void>
boundingBox
Get the bounding box of the element.
boundingBox(): Promise<PuppeteerBoundingBox | null>
boxModel
Get the CSS box model of the element.
boxModel(): Promise<PuppeteerBoxModel | null>
click
Click the element.
click(options?: PuppeteerClickOptions): Promise<void>
clickablePoint
Get a clickable point within the element.
clickablePoint(offset?: PuppeteerOffset): Promise<PuppeteerPoint>
contentFrame
Get the content frame for iframe elements.
contentFrame(): Promise<RemotePuppeteerFrame | null>
drag
Drag the element to the given target.
drag(target: PuppeteerPoint | RemotePuppeteerElementHandle): Promise<PuppeteerDragData | void>
dragAndDrop
Drag and drop to another element or point.
dragAndDrop(target: RemotePuppeteerElementHandle | PuppeteerPoint, options?: { delay?: number }): Promise<void>
dragEnter
Dispatch a dragenter event.
dragEnter(data?: PuppeteerDragData): Promise<void>
dragOver
Dispatch a dragover event.
dragOver(data?: PuppeteerDragData): Promise<void>
drop
Drop the given element onto the current one.
drop(element: RemotePuppeteerElementHandle): Promise<void>
evaluate
Evaluate a function in the context of the element.
evaluate<T = unknown>(pageFunction: string | ((element: Element, ...args: unknown[]) => T | Promise<T>), ...args: unknown[]): Promise<T>
focus
Focus the element.
focus(): Promise<void>
getProperty
Get a property value.
getProperty<T = unknown>(propertyName: string): Promise<T>
hover
Hover over the element.
hover(): Promise<void>
isHidden
Check if the element is hidden.
isHidden(): Promise<boolean>
isIntersectingViewport
Check if the element intersects the viewport.
isIntersectingViewport(options?: { threshold?: number }): Promise<boolean>
isVisible
Check if the element is visible.
isVisible(): Promise<boolean>
jsonValue
Get the JSON value of the element.
jsonValue<T = unknown>(): Promise<T>
press
Press a key while focused on the element.
press(key: string, options?: PuppeteerKeyPressOptions): Promise<void>
scrollIntoView
Scroll the element into view.
scrollIntoView(): Promise<void>
select
Select options in a <select> element.
select(...values: string[]): Promise<string[]>
tap
Tap the element (for touch devices).
tap(): Promise<void>
toElement
Convert to a typed element handle.
toElement<K extends keyof HTMLElementTagNameMap>(tagName: K): Promise<RemotePuppeteerElementHandle>
touchEnd
End the first active touch.
touchEnd(): Promise<void>
touchMove
Move the touch to the center of the element.
touchMove(touch?: { touchId?: string }): Promise<void>
type
Type text into the element.
type(text: string, options?: PuppeteerKeyboardTypeOptions): Promise<void>
uploadFile
Upload files to a file input element.
uploadFile(...filePaths: string[]): Promise<void>
waitForSelector
Wait for a child element to appear.
waitForSelector(selector: string, options?: PuppeteerWaitForSelectorOptions): Promise<RemotePuppeteerElementHandle | null>

RemotePuppeteerFileChooser

Source: sdk/src/drivers/puppeteer/generated/file-chooser.ts
class RemotePuppeteerFileChooser
RemotePuppeteerFileChooser - Remote Puppeteer FileChooser API over RPC.

Constructor

new (id: string, sendRpc: SimpleRpcSender, isMultiple: boolean)

Properties

NameTypeNotes
idstringreadonly

Methods

accept
Accept the file chooser request with the given file paths.
accept(paths: string[]): Promise<void>
cancel
Close the file chooser without selecting any files.
cancel(): Promise<void>
isMultiple
Whether file chooser allows multiple file selection.
isMultiple(): boolean

RemotePuppeteerFrame

Source: sdk/src/drivers/puppeteer/generated/frame.ts
class RemotePuppeteerFrame extends RemoteBase
RemotePuppeteerFrame - Remote Puppeteer Frame API over RPC.

Constructor

new (id: string, sendRpc: SimpleRpcSender, createElementHandle: (handleId: string) => RemotePuppeteerElementHandle, createFrame: (frameId: string) => RemotePuppeteerFrame, createLocator: (selector: string) => RemotePuppeteerLocator, createJSHandle: (handleId: string) => RemotePuppeteerJSHandle, getPage: () => RemotePuppeteerPage)

Properties

NameTypeNotes
_isDetachedbooleanWhether this frame has been detached.

Methods

$
Query for a single element.
$(selector: string): Promise<RemotePuppeteerElementHandle | null>
$$
Query for all matching elements.
$$(selector: string): Promise<RemotePuppeteerElementHandle[]>
$$eval
Evaluate JavaScript on all matching elements.
$$eval<T = unknown>(selector: string, pageFunction: string | ((els: Element[], ...args: unknown[]) => T | Promise<T>), ...args: unknown[]): Promise<T>
$eval
Evaluate JavaScript on a selected element.
$eval<T = unknown>(selector: string, pageFunction: string | ((el: Element, ...args: unknown[]) => T | Promise<T>), ...args: unknown[]): Promise<T>
addScriptTag
Add a script tag to the frame.
addScriptTag(options: PuppeteerFrameAddScriptTagOptions): Promise<RemotePuppeteerElementHandle>
addStyleTag
Add a style tag to the frame.
addStyleTag(options: PuppeteerFrameAddStyleTagOptions): Promise<RemotePuppeteerElementHandle>
childFrames
Child frames of this frame.
childFrames(): Promise<RemotePuppeteerFrame[]>
click
Click on an element.
click(selector: string, options?: PuppeteerClickOptions): Promise<void>
content
The full HTML contents of the frame.
content(): Promise<string>
detached
Is true if the frame has been detached. Otherwise, false.
detached(): boolean
evaluate
Evaluate JavaScript in the frame context.
evaluate<T = unknown>(pageFunction: string | ((...args: unknown[]) => T | Promise<T>), ...args: unknown[]): Promise<T>
evaluateHandle
Evaluates a function in the frame’s context and returns a handle to the result.
evaluateHandle<Params extends unknown[] = unknown[], Func extends (...args: Params) => unknown = (...args: Params) => unknown>(pageFunction: Func | string, ...args: Params): Promise<RemotePuppeteerJSHandle<Awaited<ReturnType<Func>>>>
focus
Focus on an element.
focus(selector: string): Promise<void>
frameElement
The frame element associated with this frame, if any.
frameElement(): Promise<RemotePuppeteerElementHandle | null>
goto
Navigate the frame to a URL.
goto(url: string, options?: PuppeteerGotoOptions): Promise<PuppeteerHTTPResponse | null>
hover
Hover over an element.
hover(selector: string): Promise<void>
isDetached
Whether this frame is detached.
isDetached(): boolean
isMainFrame
Is this the main frame?
isMainFrame(): Promise<boolean>
locator
Creates a Locator for the given selector.
locator(selector: string): RemotePuppeteerLocator
name
The frame’s name attribute as specified in the tag.
name(): Promise<string>
page
The page associated with this frame.
page(): RemotePuppeteerPage
parentFrame
The parent frame, if any.
parentFrame(): Promise<RemotePuppeteerFrame | null>
select
Select options in a <select> element.
select(selector: string, ...values: string[]): Promise<string[]>
setContent
Set the content of the frame.
setContent(html: string, options?: { timeout?: number; waitUntil?: string }): Promise<void>
tap
Tap on an element.
tap(selector: string): Promise<void>
title
The frame’s title.
title(): Promise<string>
type
Type text into an element.
type(selector: string, text: string, options?: PuppeteerKeyboardTypeOptions): Promise<void>
url
The frame’s URL.
url(): Promise<string>
waitForFunction
Wait for a function to return a truthy value.
waitForFunction<Params extends unknown[] = unknown[], Func extends (...args: Params) => unknown = (...args: Params) => unknown>(pageFunction: Func | string, options?: { timeout?: number; polling?: number | 'raf' | 'mutation' }, ...args: Params): Promise<RemotePuppeteerJSHandle<Awaited<ReturnType<Func>>>>
waitForNavigation
Wait for navigation to complete.
waitForNavigation(options?: PuppeteerWaitForNavigationOptions): Promise<PuppeteerHTTPResponse | null>
waitForSelector
Wait for a selector to appear.
waitForSelector(selector: string, options?: PuppeteerWaitForSelectorOptions): Promise<RemotePuppeteerElementHandle | null>

RemotePuppeteerHTTPRequest

Source: sdk/src/drivers/puppeteer/generated/http-request.ts
class RemotePuppeteerHTTPRequest
RemotePuppeteerHTTPRequest - Remote Puppeteer HTTPRequest API over RPC.

Constructor

new (sendRpc: SimpleRpcSender, data: SerializedHTTPRequest, factories: { createRequest?: HTTPRequestFactory; createResponse?: HTTPResponseFactory; createFrame?: FrameFactory })

Properties

NameTypeNotes
idstringgetter • The request ID.

Methods

abort
Aborts a request.
abort(errorCode?: PuppeteerErrorCode, priority?: number): Promise<void>
abortErrorReason
The most recent reason for aborting the request.
abortErrorReason(): PuppeteerErrorCode | undefined
continue
Continues a request with optional overrides.
continue(overrides?: PuppeteerContinueRequestOverrides, priority?: number): Promise<void>
continueRequestOverrides
The ContinueRequestOverrides that will be used if the interception is allowed to continue.
continueRequestOverrides(): PuppeteerContinueRequestOverrides
enqueueInterceptAction
Adds an async request handler to the processing queue.
enqueueInterceptAction(pendingHandler: () => void | PromiseLike<unknown>): Promise<void>
failure
Access information about the request’s failure.
failure(): { errorText: string } | null
fetchPostData
Fetches the POST data for the request from the browser.
fetchPostData(): Promise<string | undefined>
finalizeInterceptions
Awaits pending interception handlers and then decides how to fulfill the request interception.
finalizeInterceptions(): Promise<void>
frame
The frame that initiated the request.
frame(): unknown | null
hasPostData
True when the request has POST data.
hasPostData(): boolean
headers
HTTP headers associated with the request.
headers(): Record<string, string>
initiator
The initiator of the request.
initiator(): PuppeteerInitiator | undefined
interceptResolutionState
An InterceptResolutionState object describing the current resolution action and priority.
interceptResolutionState(): PuppeteerInterceptResolutionState
isInterceptResolutionHandled
Is true if the intercept resolution has already been handled.
isInterceptResolutionHandled(): boolean
isNavigationRequest
True if the request is driving the current frame’s navigation.
isNavigationRequest(): boolean
method
The HTTP method used for the request.
method(): string
postData
The request’s post body, if any.
postData(): string | undefined
redirectChain
A chain of requests initiated to fetch a resource.
redirectChain(): RemotePuppeteerHTTPRequest[]
resourceType
The request’s resource type.
resourceType(): PuppeteerResourceType
respond
Fulfills a request with the given response.
respond(response: PuppeteerResponseForRequest, priority?: number): Promise<void>
response
A matching HTTPResponse object, or null if not received yet.
response(): RemotePuppeteerHTTPResponse | null
responseForRequest
The ResponseForRequest that gets used if the interception is allowed to respond.
responseForRequest(): PuppeteerResponseForRequest | undefined
setFailure
setFailure(errorText: string): void
url
The URL of the request.
url(): string

RemotePuppeteerHTTPResponse

Source: sdk/src/drivers/puppeteer/generated/http-response.ts
class RemotePuppeteerHTTPResponse
RemotePuppeteerHTTPResponse - Remote Puppeteer HTTPResponse API over RPC.

Constructor

new (sendRpc: SimpleRpcSender, data: PuppeteerHTTPResponse, factories: { createRequest?: HTTPRequestFactory; createFrame?: FrameFactory })

Properties

NameTypeNotes
idstringgetter • The response ID.

Methods

buffer
Promise which resolves to a buffer with the response body.
buffer(): Promise<Buffer>
content
Alias for text() - returns the response body as a string. Note: In real Puppeteer, content() is an internal method. This is provided for convenience.
content(): Promise<string>
frame
The Frame that initiated this response, or null if navigating to error pages.
frame(): unknown | null
fromCache
True if the response was served from the browser’s disk cache.
fromCache(): boolean
fromServiceWorker
True if the response was served by a service worker.
fromServiceWorker(): boolean
headers
An object with HTTP headers associated with the response. All header names are lowercase.
headers(): Record<string, string>
json
Promise which resolves to the response body as JSON.
json(): Promise<unknown>
ok
True if the response was successful (status in the range 200-299).
ok(): boolean
remoteAddress
The IP address and port number used to connect to the remote server.
remoteAddress(): PuppeteerRemoteAddress
request
A matching HTTPRequest object for this response.
request(): RemotePuppeteerHTTPRequest | null
securityDetails
Security details if the response was received over HTTPS, null otherwise.
securityDetails(): PuppeteerSecurityDetails | null
status
The status code of the response (e.g., 200, 404).
status(): number
statusText
The status text of the response (e.g., ‘OK’, ‘Not Found’).
statusText(): string
text
Promise which resolves to the response body as text.
text(): Promise<string>
timing
Timing information related to the response.
timing(): PuppeteerResourceTiming | null
url
The URL of the response.
url(): string

RemotePuppeteerJSHandle

Source: sdk/src/drivers/puppeteer/generated/js-handle.ts
class RemotePuppeteerJSHandle
RemotePuppeteerJSHandle - Remote Puppeteer JSHandle API over RPC.

Constructor

new (handleId: string, sendRpc: JSHandleRpcSender, createJSHandle: JSHandleFactory, elementHandleFactory?: ElementHandleFactoryForJSHandle)

Properties

NameTypeNotes
disposedbooleangetter • Check if this handle has been disposed.
handleIdstringreadonly

Methods

evaluate
Evaluates the given function with the current handle as its first argument.
evaluate<Params extends unknown[] = unknown[], Func extends (value: T, ...args: Params) => unknown = (value: T, ...args: Params) => unknown>(pageFunction: Func | string, ...args: unknown[]): Promise<Awaited<ReturnType<Func>>>
evaluateHandle
Evaluates the given function with the current handle as its first argument and returns a new JSHandle.
evaluateHandle<Params extends unknown[] = unknown[], Func extends (value: T, ...args: Params) => unknown = (value: T, ...args: Params) => unknown>(pageFunction: Func | string, ...args: unknown[]): Promise<RemotePuppeteerJSHandle<Awaited<ReturnType<Func>>>>
getProperty
Fetches a single property from the referenced object.
getProperty<K extends keyof T>(propertyName: K | string): Promise<RemotePuppeteerJSHandle<T[K]>>
jsonValue
Returns a vanilla object representing the serializable portions of the referenced object.
jsonValue(): Promise<T>

RemotePuppeteerKeyboard

Source: sdk/src/drivers/puppeteer/generated/keyboard.ts
class RemotePuppeteerKeyboard extends RemoteComponentBase
RemotePuppeteerKeyboard - Remote Puppeteer Keyboard API over RPC.

Constructor

new (sendRpc: SimpleRpcSender)

Methods

down
Dispatches a keydown event.
down(key: PuppeteerKeyInput, options?: PuppeteerKeyDownOptions): Promise<void>
press
Shortcut for Keyboard.down and Keyboard.up.
press(key: PuppeteerKeyInput, options?: PuppeteerKeyPressOptions): Promise<void>
sendCharacter
Dispatches a keypress and input event. This does not send a keydown or keyup event.
sendCharacter(char: string): Promise<void>
type
Sends a keydown, keypress/input, and keyup event for each character in the text.
type(text: string, options?: PuppeteerKeyboardTypeOptions): Promise<void>
up
Dispatches a keyup event.
up(key: PuppeteerKeyInput): Promise<void>

RemotePuppeteerLocator

Source: sdk/src/drivers/puppeteer/generated/locator.ts
class RemotePuppeteerLocator
RemotePuppeteerLocator - Remote Puppeteer Locator API over RPC.

Constructor

new (selector: string, sendRpc: SimpleRpcSender, createElementHandle: ElementHandleFactoryLocal, createLocator: LocatorFactory, state?: Partial<RemotePuppeteerLocatorState>)

Properties

NameTypeNotes
selectorstringreadonly

Methods

click
Clicks the located element.
click(options?: Readonly<PuppeteerLocatorClickOptions>): Promise<void>
clone
Clones the locator.
clone(): RemotePuppeteerLocator<T>
fill
Fills out the input identified by the locator.
fill(value: string, options?: Readonly<PuppeteerActionOptions>): Promise<void>
hover
Hovers over the located element.
hover(options?: Readonly<PuppeteerActionOptions>): Promise<void>
race
Creates a race between multiple locators.
static race<T extends readonly RemotePuppeteerLocator<unknown>[]>(locators: T): Promise<RemotePuppeteerLocator<T[number] extends RemotePuppeteerLocator<infer U> ? U : never>>
scroll
Scrolls the located element.
scroll(options?: Readonly<PuppeteerLocatorScrollOptions>): Promise<void>
setEnsureElementIsInTheViewport
Creates a new locator with ensureElementIsInTheViewport set to the specified value. Whether to scroll element into viewport
setEnsureElementIsInTheViewport(ensureElementIsInTheViewport: boolean): RemotePuppeteerLocator<T>
setTimeout
Creates a new locator with timeout set to the specified value. Timeout in milliseconds
setTimeout(timeout: number): RemotePuppeteerLocator<T>
setVisibility
Creates a new locator with visibility set to the specified value. Visibility filter
setVisibility(visibility: PuppeteerVisibilityOption): RemotePuppeteerLocator<T>
setWaitForEnabled
Creates a new locator with waitForEnabled set to the specified value. Whether to wait for element to be enabled
setWaitForEnabled(waitForEnabled: boolean): RemotePuppeteerLocator<T>
setWaitForStableBoundingBox
Creates a new locator with waitForStableBoundingBox set to the specified value. Whether to wait for stable bounding box
setWaitForStableBoundingBox(waitForStableBoundingBox: boolean): RemotePuppeteerLocator<T>
wait
Waits for the locator to get the serialized value from the page.
wait(options?: Readonly<PuppeteerActionOptions>): Promise<T>
waitHandle
Waits for the locator to get a handle from the page.
waitHandle(options?: Readonly<PuppeteerActionOptions>): Promise<RemotePuppeteerElementHandle>

RemotePuppeteerMouse

Source: sdk/src/drivers/puppeteer/generated/mouse.ts
class RemotePuppeteerMouse extends RemoteComponentBase
RemotePuppeteerMouse - Remote Puppeteer Mouse API over RPC.

Constructor

new (sendRpc: SimpleRpcSender)

Methods

click
Click at specific coordinates.
click(x: number, y: number, options?: PuppeteerMouseClickOptions): Promise<void>
down
Press mouse button down.
down(options?: PuppeteerMouseOptions): Promise<void>
drag
Dispatches a drag event.
drag(start: PuppeteerPoint, target: PuppeteerPoint): Promise<PuppeteerDragData>
dragAndDrop
Perform a drag and drop operation.
dragAndDrop(start: PuppeteerPoint, target: PuppeteerPoint, options?: { delay?: number }): Promise<void>
dragEnter
Dispatches a dragenter event.
dragEnter(target: PuppeteerPoint, data: PuppeteerDragData): Promise<void>
dragOver
Dispatches a dragover event.
dragOver(target: PuppeteerPoint, data: PuppeteerDragData): Promise<void>
drop
Performs a dragenter, dragover, and drop in sequence.
drop(target: PuppeteerPoint, data: PuppeteerDragData): Promise<void>
move
Move mouse to specific coordinates.
move(x: number, y: number, options?: PuppeteerMouseMoveOptions): Promise<void>
reset
Resets the mouse to the default state.
reset(): Promise<void>
up
Release mouse button.
up(options?: PuppeteerMouseOptions): Promise<void>
wheel
Scroll mouse wheel.
wheel(options?: PuppeteerMouseWheelOptions): Promise<void>

RemotePuppeteerPage

Source: sdk/src/drivers/puppeteer/generated/page.ts
class RemotePuppeteerPage extends PuppeteerEventEmitter<PageEvents>
RemotePuppeteerPage - Remote Puppeteer Page API over RPC.

Constructor

new (sendRpc: SimpleRpcSender, id: string, createElementHandle: (handleId: string) => RemotePuppeteerElementHandle, createFrame: (frameId: string) => RemotePuppeteerFrame, createLocator: (selector: string) => RemotePuppeteerLocator, createJSHandle: (handleId: string) => RemotePuppeteerJSHandle)

Properties

NameTypeNotes
accessibilityRemotePuppeteerAccessibilityreadonly
idstringreadonly
isClosedbooleangetter
keyboardRemotePuppeteerKeyboardreadonly
mouseRemotePuppeteerMousereadonly
touchscreenRemotePuppeteerTouchscreenreadonly
tracingRemotePuppeteerTracingreadonly

Methods

$
Query for a single element.
$(selector: string): Promise<RemotePuppeteerElementHandle | null>
$$
Query for all matching elements.
$$(selector: string): Promise<RemotePuppeteerElementHandle[]>
$$eval
Evaluate JavaScript on all matching elements.
$$eval<T = unknown>(selector: string, pageFunction: Function | string, ...args: unknown[]): Promise<T>
$eval
Evaluate JavaScript on a selected element.
$eval<T = unknown>(selector: string, pageFunction: Function | string, ...args: unknown[]): Promise<T>
$x
Evaluate XPath expression.
$x(expression: string): Promise<RemotePuppeteerElementHandle[]>
addScriptTag
Add script tag.
addScriptTag(options: { url?: string; path?: string; content?: string; type?: string }): Promise<PuppeteerSerializedElement>
addStyleTag
Add style tag.
addStyleTag(options: { url?: string; path?: string; content?: string }): Promise<PuppeteerSerializedElement>
authenticate
Authenticate with HTTP auth.
authenticate(credentials: { username: string; password: string } | null): Promise<void>
bringToFront
Bring page to front.
bringToFront(): Promise<void>
click
Click on an element matching the selector.
click(selector: string, options?: PuppeteerClickOptions): Promise<void>
close
Close the page.
close(): Promise<void>
content
Get the full HTML content.
content(): Promise<string>
cookies
Get all cookies.
cookies(...urls: string[]): Promise<PuppeteerCookie[]>
createCDPSession
Create a CDP session.
createCDPSession(): Promise<{ sessionId: string }>
deleteCookie
Delete cookies.
deleteCookie(...cookies: PuppeteerCookie[]): Promise<void>
emulate
Emulate a device (viewport + user agent).
emulate(device: PuppeteerDevice): Promise<void>
emulateCPUThrottling
Emulate CPU throttling.
emulateCPUThrottling(factor: number | null): Promise<void>
emulateIdleState
Emulate idle state.
emulateIdleState(overrides?: PuppeteerIdleOverrides): Promise<void>
emulateMediaFeatures
Emulate media features.
emulateMediaFeatures(features?: Array<{ name: string; value: string }>): Promise<void>
emulateMediaType
Emulate media type.
emulateMediaType(type?: 'screen' | 'print' | null): Promise<void>
emulateNetworkConditions
Emulate network conditions.
emulateNetworkConditions(conditions: { offline: boolean; downloadThroughput: number; uploadThroughput: number; latency: number } | null): Promise<void>
emulateTimezone
Emulate timezone.
emulateTimezone(timezoneId?: string): Promise<void>
emulateVisionDeficiency
Emulate vision deficiency.
emulateVisionDeficiency(type?: 'none' | 'achromatopsia' | 'deuteranopia' | 'protanopia' | 'tritanopia' | 'blurredVision'): Promise<void>
evaluate
Evaluate JavaScript in the page context.
evaluate<T = unknown>(pageFunction: Function | string, ...args: unknown[]): Promise<T>
evaluateHandle
Evaluate handle (returns a JSHandle).
evaluateHandle<T = unknown>(pageFunction: Function | string, ...args: unknown[]): Promise<unknown>
evaluateOnNewDocument
Add a script to evaluate when a new document is created.
evaluateOnNewDocument(pageFunction: Function | string, ...args: unknown[]): Promise<{ identifier: string }>
focus
Focus on an element.
focus(selector: string): Promise<void>
frames
Get all frames.
frames(): Promise<RemotePuppeteerFrame[]>
getDefaultNavigationTimeout
Get the default navigation timeout.
getDefaultNavigationTimeout(): number
getDefaultTimeout
Get the default timeout.
getDefaultTimeout(): number
goBack
Navigate back in history.
goBack(options?: PuppeteerWaitForNavigationOptions): Promise<PuppeteerHTTPResponse | null>
goForward
Navigate forward in history.
goForward(options?: PuppeteerWaitForNavigationOptions): Promise<PuppeteerHTTPResponse | null>
goto
Navigate to a URL.
goto(url: string, options?: PuppeteerGotoOptions): Promise<PuppeteerHTTPResponse | null>
hover
Hover over an element.
hover(selector: string): Promise<void>
innerHTML
Get the inner HTML of an element matching the selector.
innerHTML(selector: string): Promise<string>
isDragInterceptionEnabled
Check if drag interception is enabled.
isDragInterceptionEnabled(): boolean
isJavaScriptEnabled
Check if JavaScript is enabled.
isJavaScriptEnabled(): Promise<boolean>
isServiceWorkerBypassed
Check if service worker bypass is enabled.
isServiceWorkerBypassed(): Promise<boolean>
locator
Create a locator for the given selector.
locator(selector: string): RemotePuppeteerLocator
mainFrame
Get the main frame.
mainFrame(): RemotePuppeteerFrame
markClosed
Mark this page as closed (internal use by browser.close()).
markClosed(): void
metrics
Get metrics.
metrics(): Promise<Record<string, number>>
openDevTools
Open DevTools. Only works in headful mode.
openDevTools(options?: { docking?: 'right' | 'bottom' | 'left' | 'undocked' }): Promise<void>
pdf
Generate a PDF (returns base64 string or Buffer).
pdf(options?: PuppeteerPDFOptions): Promise<string | Buffer>
queryObjects
Query all objects of a given prototype.
queryObjects(prototypeHandle: RemotePuppeteerElementHandle): Promise<RemotePuppeteerElementHandle>
reload
Reload the page.
reload(options?: PuppeteerReloadOptions): Promise<PuppeteerHTTPResponse | null>
removeExposedFunction
Remove an exposed function.
removeExposedFunction(name: string): Promise<void>
removeScriptToEvaluateOnNewDocument
Remove an injected script.
removeScriptToEvaluateOnNewDocument(identifier: string): Promise<void>
resize
Resize the page.
resize(options: { width: number; height: number }): Promise<void>
screenshot
Take a screenshot (returns base64 string or Buffer).
screenshot(options?: PuppeteerScreenshotOptions): Promise<string | Buffer>
select
Select options in a <select> element.
select(selector: string, ...values: (string | PuppeteerSelectValue)[]): Promise<string[]>
sendCDP
Send a CDP command directly.
sendCDP<T = unknown>(method: string, params?: Record<string, unknown>): Promise<T>
setBypassCSP
Toggle bypassing Content-Security-Policy.
setBypassCSP(enabled: boolean): Promise<void>
setBypassServiceWorker
Set service worker bypass.
setBypassServiceWorker(bypass: boolean): Promise<void>
setCacheEnabled
Set cache enabled/disabled.
setCacheEnabled(enabled: boolean): Promise<void>
setContent
Set the page content.
setContent(html: string, options?: { timeout?: number; waitUntil?: string }): Promise<void>
setCookie
Set cookies.
setCookie(...cookies: PuppeteerCookie[]): Promise<void>
setDefaultNavigationTimeout
Set the default navigation timeout.
setDefaultNavigationTimeout(timeout: number): Promise<void>
setDefaultTimeout
Set the default timeout.
setDefaultTimeout(timeout: number): Promise<void>
setDragInterception
Set drag interception.
setDragInterception(enabled: boolean): Promise<void>
setExtraHTTPHeaders
Set extra HTTP headers.
setExtraHTTPHeaders(headers: Record<string, string>): Promise<void>
setGeolocation
Set geolocation.
setGeolocation(geolocation: PuppeteerGeolocation): Promise<void>
setJavaScriptEnabled
Set JavaScript enabled/disabled.
setJavaScriptEnabled(enabled: boolean): Promise<void>
setOfflineMode
Set offline mode.
setOfflineMode(enabled: boolean): Promise<void>
setRequestInterception
Set request interception enabled/disabled.
setRequestInterception(enabled: boolean): Promise<void>
setUserAgent
Set user agent.
setUserAgent(userAgent: string): Promise<void>
setViewport
Set the viewport size. Pass null to reset to default.
setViewport(viewport: PuppeteerViewport | null): Promise<void>
tap
Tap on an element (for touch devices).
tap(selector: string): Promise<void>
target
Get the target for this page.
target(): Promise<PuppeteerTarget>
textContent
Get the text content of an element matching the selector.
textContent(selector: string): Promise<string | null>
title
Get the page title.
title(): Promise<string>
type
Type text into an element.
type(selector: string, text: string, options?: PuppeteerKeyboardTypeOptions): Promise<void>
url
Get the current URL.
url(): Promise<string>
viewport
Get the current viewport.
viewport(): Promise<PuppeteerViewport | null>
waitForDevicePrompt
Wait for a device prompt (e.g., Bluetooth, USB).
waitForDevicePrompt(options?: { timeout?: number }): Promise<{
    devices: Array<{ name: string; id: string }>;
    select: (deviceId: string) => Promise<void>;
    cancel: () => Promise<void>;
  }>
waitForFileChooser
Wait for a file chooser to appear.
waitForFileChooser(options?: { timeout?: number }): Promise<RemotePuppeteerFileChooser>
waitForFrame
Wait for a frame to appear.
waitForFrame(urlOrPredicate: string, options?: { timeout?: number }): Promise<RemotePuppeteerFrame>
waitForFunction
Wait for a function to return true.
waitForFunction(pageFunction: Function | string, options?: { timeout?: number; polling?: number | "raf" }, ...args: unknown[]): Promise<void>
waitForNavigation
Wait for navigation to complete.
waitForNavigation(options?: PuppeteerWaitForNavigationOptions): Promise<PuppeteerHTTPResponse | null>
waitForNetworkIdle
Wait for network to be idle.
waitForNetworkIdle(options?: PuppeteerWaitForNetworkIdleOptions): Promise<void>
waitForRequest
Wait for a specific request.
waitForRequest(urlOrPredicate: string, options?: { timeout?: number }): Promise<PuppeteerHTTPRequest>
waitForResponse
Wait for a specific response.
waitForResponse(urlOrPredicate: string, options?: { timeout?: number }): Promise<PuppeteerHTTPResponse>
waitForSelector
Wait for a selector to appear in the DOM.
waitForSelector(selector: string, options?: PuppeteerWaitForOptions): Promise<RemotePuppeteerElementHandle | null>
waitForTimeout
Wait for a timeout.
waitForTimeout(milliseconds: number): Promise<void>
windowId
Get the window ID.
windowId(): Promise<number>
workers
Get all web workers for this page.
workers(): Promise<PuppeteerWebWorker[]>

RemotePuppeteerTarget

Source: sdk/src/drivers/puppeteer/generated/target.ts
class RemotePuppeteerTarget
RemotePuppeteerTarget - Remote Puppeteer Target API over RPC.

Constructor

new (sendRpc: SimpleRpcSender, info: SerializedTargetInfo, factories: TargetFactories)

Properties

NameTypeNotes
targetIdstringgetter • The target ID.

Methods

asPage
Forcefully creates a page for a target of any type.
asPage(): Promise<RemotePuppeteerPage>
browser
Get the browser the target belongs to.
browser(): RemotePuppeteerBrowser
browserContext
Get the browser context the target belongs to.
browserContext(): RemotePuppeteerBrowserContext
createCDPSession
Creates a Chrome DevTools Protocol session attached to the target.
createCDPSession(): Promise<{ sessionId: string }>
opener
Get the target that opened this target.
opener(): RemotePuppeteerTarget | undefined
page
Get the page for this target.
page(): Promise<RemotePuppeteerPage | null>
type
Identifies what kind of target this is.
type(): PuppeteerTargetType
url
Gets the URL of the target.
url(): string
worker
Get the web worker for this target.
worker(): Promise<RemotePuppeteerWebWorker | null>

RemotePuppeteerTouchHandle

Source: sdk/src/drivers/puppeteer/generated/touchscreen.ts
class RemotePuppeteerTouchHandle
RemotePuppeteerTouchHandle - Represents a single touch point. Created by Touchscreen.touchStart().

Constructor

new (sendRpc: SimpleRpcSender, _touchId: string)

Methods

end
Dispatches a touchend event for this touch.
end(): Promise<void>
move
Dispatches a touchmove event for this touch.
move(x: number, y: number): Promise<void>

RemotePuppeteerTouchscreen

Source: sdk/src/drivers/puppeteer/generated/touchscreen.ts
class RemotePuppeteerTouchscreen extends RemoteComponentBase
RemotePuppeteerTouchscreen - Remote Puppeteer Touchscreen API over RPC.

Constructor

new (sendRpc: SimpleRpcSender)

Methods

tap
Dispatches a touchstart and touchend event (simulates a tap).
tap(x: number, y: number): Promise<void>
touchEnd
Dispatches a touchend event.
touchEnd(): Promise<void>
touchMove
Dispatches a touchmove event on the active touch.
touchMove(x: number, y: number): Promise<void>
touchStart
Dispatches a touchstart event.
touchStart(x: number, y: number): Promise<TouchHandle>

RemotePuppeteerTracing

Source: sdk/src/drivers/puppeteer/generated/tracing.ts
class RemotePuppeteerTracing extends RemoteComponentBase
RemotePuppeteerTracing - Remote Puppeteer Tracing API over RPC.

Constructor

new (sendRpc: SimpleRpcSender)

Methods

start
Starts a trace for the current page.
start(options?: PuppeteerTracingOptions): Promise<void>
stop
Stops the trace and returns the trace data.
stop(): Promise<Buffer | undefined>

RemotePuppeteerWebWorker

Source: sdk/src/drivers/puppeteer/generated/web-worker.ts
class RemotePuppeteerWebWorker extends RemoteBase
RemotePuppeteerWebWorker - Remote Puppeteer WebWorker API over RPC.

Constructor

new (id: string, sendRpc: SimpleRpcSender, url: string)

Methods

close
Closes the web worker.
close(): Promise<void>
evaluate
Evaluates a given function in the worker.
evaluate<T = unknown>(pageFunction: string | ((...args: unknown[]) => T | Promise<T>), ...args: unknown[]): Promise<T>
url
The URL of this web worker.
url(): string

UnsupportedOperation

Source: sdk/src/drivers/puppeteer/errors.ts
class UnsupportedOperation extends PuppeteerError
UnsupportedOperation is thrown when an operation is not supported.

Constructor

new (message?: string)

Functions

isSerializedHTTPResponse

Source: sdk/src/drivers/puppeteer/generated/http-response.ts Type guard to check if a value is a serialized HTTPResponse.
isSerializedHTTPResponse(value: unknown): value is PuppeteerHTTPResponse

isSerializedJSHandle

Source: sdk/src/drivers/puppeteer/generated/js-handle.ts Type guard for serialized JSHandle responses.
isSerializedJSHandle(value: unknown): value is SerializedJSHandle

Interfaces

BrowserContextEvents

Source: sdk/src/drivers/puppeteer/types.ts BrowserContextEvents - maps event names to their payload types.
export interface BrowserContextEvents extends Record<string, unknown> {
  /** Emitted when the URL of a target inside the context changes. */
  targetchanged: PuppeteerTarget;
  /** Emitted when a target is created inside the context. */
  targetcreated: PuppeteerTarget;
  /** Emitted when a target is destroyed inside the context. */
  targetdestroyed: PuppeteerTarget;
}

BrowserEvents

Source: sdk/src/drivers/puppeteer/types.ts BrowserEvents - maps event names to their payload types.
export interface BrowserEvents extends Record<string, unknown> {
  /** Emitted when the browser is disconnected. */
  disconnected: undefined;
  /** Emitted when the URL of a target changes. */
  targetchanged: PuppeteerTarget;
  /** Emitted when a target is created. */
  targetcreated: PuppeteerTarget;
  /** Emitted when a target is destroyed. */
  targetdestroyed: PuppeteerTarget;
}

PageEvents

Source: sdk/src/drivers/puppeteer/types.ts PageEvents - maps event names to their payload types.
export interface PageEvents extends Record<string, unknown> {
  /** Emitted when the page closes. */
  close: undefined;
  /** Emitted when JavaScript within the page calls console API methods. */
  console: PuppeteerConsoleMessage;
  /** Emitted when a JavaScript dialog appears (alert, prompt, confirm, beforeunload). */
  dialog: PuppeteerDialog;
  /** Emitted when the JavaScript DOMContentLoaded event is dispatched. */
  domcontentloaded: undefined;
  /** Emitted when the page crashes. */
  error: Error;
  /** Emitted when a frame is attached. */
  frameattached: PuppeteerFrame;
  /** Emitted when a frame is detached. */
  framedetached: PuppeteerFrame;
  /** Emitted when a frame is navigated to a new URL. */
  framenavigated: PuppeteerFrame;
  /** Emitted when the JavaScript load event is dispatched. */
  load: undefined;
  /** Emitted when console.timeStamp is called. */
  metrics: { title: string; metrics: Record<string, number> };
  /** Emitted when an uncaught exception happens within the page. */
  pageerror: Error | unknown;
  /** Emitted when the page opens a new tab or window. */
  popup: PuppeteerPage | null;
  /** Emitted when a page issues a request. */
  request: PuppeteerHTTPRequest;
  /** Emitted when a request fails. */
  requestfailed: PuppeteerHTTPRequest;
  /** Emitted when a request finishes successfully. */
  requestfinished: PuppeteerHTTPRequest;
  /** Emitted when a request is served from cache. */
  requestservedfromcache: PuppeteerHTTPRequest;
  /** Emitted when a response is received. */
  response: PuppeteerHTTPResponse;
  /** Emitted when a dedicated WebWorker is spawned by the page. */
  workercreated: PuppeteerWebWorker;
  /** Emitted when a dedicated WebWorker is destroyed by the page. */
  workerdestroyed: PuppeteerWebWorker;
}

PuppeteerElementHandle

Source: sdk/src/drivers/puppeteer/types.ts
export interface PuppeteerElementHandle {
  // Actions
  click(options?: PuppeteerClickOptions): Promise<void>;
  tap(): Promise<void>;
  hover(): Promise<void>;
  focus(): Promise<void>;
  type(text: string, options?: PuppeteerKeyboardTypeOptions): Promise<void>;
  press(key: PuppeteerKeyInput, options?: PuppeteerKeyPressOptions): Promise<void>;
  select(...values: string[]): Promise<string[]>;
  uploadFile(...filePaths: string[]): Promise<void>;
  scrollIntoView(): Promise<void>;
  autofill(data: PuppeteerAutofillData): Promise<void>;

  // Queries
  $(selector: string): Promise<PuppeteerElementHandle | null>;
  $$(selector: string): Promise<PuppeteerElementHandle[]>;
  $x(expression: string): Promise<PuppeteerElementHandle[]>;

  // Properties (from JSHandle)
  getProperty(propertyName: string): Promise<unknown>;
  jsonValue(): Promise<unknown>;
  backendNodeId(): Promise<number>;

  // State checks
  isVisible(): Promise<boolean>;
  isHidden(): Promise<boolean>;
  isIntersectingViewport(options?: { threshold?: number }): Promise<boolean>;

  // Position
  boundingBox(): Promise<PuppeteerBoundingBox | null>;
  boxModel(): Promise<PuppeteerBoxModel | null>;
  clickablePoint(offset?: PuppeteerPoint): Promise<PuppeteerPoint>;

  // Screenshot
  screenshot(options?: PuppeteerScreenshotOptions): Promise<string | Buffer>;

  // Evaluation
  evaluate<T = unknown>(
    pageFunction: string | ((element: Element, ...args: unknown[]) => T | Promise<T>),
    ...args: unknown[]
  ): Promise<T>;
  $eval<T = unknown>(
    selector: string,
    pageFunction: string | ((element: Element, ...args: unknown[]) => T | Promise<T>),
    ...args: unknown[]
  ): Promise<T>;
  $$eval<T = unknown>(
    selector: string,
    pageFunction: string | ((elements: Element[], ...args: unknown[]) => T | Promise<T>),
    ...args: unknown[]
  ): Promise<T>;

  // Frame
  contentFrame(): Promise<unknown | null>;
  frame(): Promise<unknown | null>;

  // Drag & Drop
  drag(target: PuppeteerPoint | PuppeteerElementHandle): Promise<PuppeteerDragData | void>;
  /** @deprecated Do not use. `dragenter` will automatically be performed during dragging. */
  dragEnter(data?: PuppeteerDragData): Promise<void>;
  /** @deprecated Do not use. `dragover` will automatically be performed during dragging. */
  dragOver(data?: PuppeteerDragData): Promise<void>;
  dragAndDrop(
    target: PuppeteerElementHandle | PuppeteerPoint,
    options?: { delay?: number }
  ): Promise<void>;
  drop(element: PuppeteerElementHandle): Promise<void>;

  // Touch
  touchStart(): Promise<TouchHandle>;
  touchMove(touch?: TouchHandle): Promise<void>;
  touchEnd(): Promise<void>;

  // Wait
  waitForSelector(
    selector: string,
    options?: PuppeteerWaitForSelectorOptions
  ): Promise<PuppeteerElementHandle | null>;

  // Type Conversion
  toElement<K extends keyof HTMLElementTagNameMap>(tagName: K): Promise<PuppeteerElementHandle>;
  asLocator(): unknown; // Returns Locator, but avoiding circular dependency

  // Lifecycle
  dispose(): Promise<void>;
}

PuppeteerPage

Source: sdk/src/drivers/puppeteer/types.ts
export interface PuppeteerPage {
  // Navigation - return HTTPResponse | null to match real Puppeteer
  goto(url: string, options?: PuppeteerGotoOptions): Promise<PuppeteerHTTPResponse | null>;
  reload(options?: PuppeteerReloadOptions): Promise<PuppeteerHTTPResponse | null>;
  goBack(options?: PuppeteerWaitForNavigationOptions): Promise<PuppeteerHTTPResponse | null>;
  goForward(options?: PuppeteerWaitForNavigationOptions): Promise<PuppeteerHTTPResponse | null>;

  // Page info
  url(): string;
  title(): Promise<string>;
  content(): Promise<string>;

  // Element interaction
  click(selector: string, options?: PuppeteerClickOptions): Promise<void>;
  type(selector: string, text: string, options?: PuppeteerKeyboardTypeOptions): Promise<void>;
  focus(selector: string): Promise<void>;
  hover(selector: string): Promise<void>;
  select(selector: string, ...values: PuppeteerSelectValue[]): Promise<string[]>;

  // Element queries
  $(selector: string): Promise<PuppeteerElementHandle | null>;
  $$(selector: string): Promise<PuppeteerElementHandle[]>;
  $eval<T>(
    selector: string,
    pageFunction: PuppeteerEvalFunction<T>,
    ...args: unknown[]
  ): Promise<T>;
  $$eval<T>(
    selector: string,
    pageFunction: PuppeteerEvalAllFunction<T>,
    ...args: unknown[]
  ): Promise<T>;

  // Waiting
  waitForSelector(
    selector: string,
    options?: PuppeteerWaitForOptions
  ): Promise<PuppeteerElementHandle | null>;
  waitForNavigation(options?: PuppeteerWaitForNavigationOptions): Promise<PuppeteerHTTPResponse | null>;
  waitForTimeout(timeout: number): Promise<void>;

  // Evaluate
  evaluate<T>(pageFunction: PuppeteerEvaluateFunction<T>, ...args: unknown[]): Promise<T>;
  evaluateHandle<T>(
    pageFunction: PuppeteerEvaluateFunction<T>,
    ...args: unknown[]
  ): Promise<unknown>;

  // Screenshot & PDF
  screenshot(options?: PuppeteerScreenshotOptions): Promise<string | Buffer>;
  pdf(options?: PuppeteerPDFOptions): Promise<Buffer>;

  // Viewport - accepts null to reset
  setViewport(viewport: PuppeteerViewport | null): Promise<void>;
  viewport(): PuppeteerViewport | null;

  // Cookies
  cookies(...urls: string[]): Promise<PuppeteerCookie[]>;
  setCookie(...cookies: PuppeteerCookie[]): Promise<void>;
  deleteCookie(...cookies: { name: string; domain?: string; path?: string }[]): Promise<void>;

  // Close
  close(): Promise<void>;
  isClosed(): boolean;

  // Bring to front
  bringToFront(): Promise<void>;
}

SerializedHTTPRequest

Source: sdk/src/drivers/puppeteer/generated/http-request.ts Serialized HTTPRequest data received from the server.
export interface SerializedHTTPRequest {
  requestId: string;
  url: string;
  method: string;
  headers: Record<string, string>;
  postData?: string;
  hasPostData?: boolean;
  resourceType: PuppeteerResourceType;
  isNavigationRequest: boolean;
  initiator?: PuppeteerInitiator;
  redirectChain?: string[];
  responseId?: string;
  frameId?: string;
}

SerializedJSHandle

Source: sdk/src/drivers/puppeteer/generated/js-handle.ts Serialized JSHandle response from backend.
export interface SerializedJSHandle {
  __bctrl_type: 'JSHandle';
  id: string;
  handleType: 'JSHandle' | 'ElementHandle';
}

SerializedTargetInfo

Source: sdk/src/drivers/puppeteer/generated/target.ts Serialized target info from the backend.
export interface SerializedTargetInfo {
  targetId: string;
  type: PuppeteerTargetType;
  url: string;
  title?: string;
  attached?: boolean;
  openerId?: string;
  browserContextId?: string;
}

SnapshotOptions

Source: sdk/src/drivers/puppeteer/generated/accessibility.ts Options for SDK method. Wraps PuppeteerSnapshotOptions with SDK-friendly types.
export interface SnapshotOptions {
  /**
   * Prune uninteresting nodes from the tree. @default true
   */
  interestingOnly?: boolean;
  /**
   * Root element to get the accessibility tree for. Can be a handle ID string or any object with a handleId property (e.g., RemotePuppeteerElementHandle). If not provided, defaults to the root node of the entire page.
   */
  root?: string | HasHandleId;
}

TargetFactories

Source: sdk/src/drivers/puppeteer/generated/target.ts Factory functions for creating related objects. These are passed in to avoid circular dependencies.
export interface TargetFactories {
  createPage: (pageId: string) => RemotePuppeteerPage;
  createWebWorker: (workerId: string, url: string) => RemotePuppeteerWebWorker;
  getBrowser: () => RemotePuppeteerBrowser;
  getBrowserContext: (contextId: string) => RemotePuppeteerBrowserContext;
  getTarget: (targetId: string) => RemotePuppeteerTarget | undefined;
}

TouchHandle

Source: sdk/src/drivers/puppeteer/types.ts
export interface TouchHandle {
  /**
   * Dispatches a `touchMove` event for this touch.
   * @see https://pptr.dev/api/puppeteer.touchhandle.move
   */
  move(x: number, y: number): Promise<void>;

  /**
   * Dispatches a `touchend` event for this touch.
   * @see https://pptr.dev/api/puppeteer.touchhandle.end
   */
  end(): Promise<void>;
}

Type Aliases

ElementHandleFactoryForJSHandle

Source: sdk/src/drivers/puppeteer/generated/js-handle.ts Factory function to create ElementHandle instances (for asElement).
export type ElementHandleFactoryForJSHandle = (handleId: string) => RemotePuppeteerElementHandle;

ElementHandleFactoryLocal

Source: sdk/src/drivers/puppeteer/generated/locator.ts Factory function for creating element handles (uses SDK type)
export type ElementHandleFactoryLocal = (handleId: string) => RemotePuppeteerElementHandle;

EvaluateFunc

Source: sdk/src/drivers/puppeteer/types.ts
export type EvaluateFunc<V = void, T = unknown> = V extends void
  ? string | ((...args: unknown[]) => T | Promise<T>)
  : string | ((first: V, ...args: unknown[]) => T | Promise<T>);

Handler

Source: sdk/src/drivers/puppeteer/event-emitter.ts Handler function type for event listeners.
export type Handler<T = unknown> = (event: T) => void;

HTTPResponseDataFactory

Source: sdk/src/drivers/puppeteer/generated/http-response.ts Factory function type for creating HTTPResponse instances from serialized data. Used when the full response data is already available.
export type HTTPResponseDataFactory = (data: PuppeteerHTTPResponse) => RemotePuppeteerHTTPResponse;

HTTPResponseFactory

Source: sdk/src/drivers/puppeteer/generated/http-response.ts Factory function type for creating HTTPResponse instances from response ID. Used when the full response data needs to be fetched lazily.
export type HTTPResponseFactory = (responseId: string) => RemotePuppeteerHTTPResponse | null;

JSHandleFactory

Source: sdk/src/drivers/puppeteer/generated/js-handle.ts Factory function to create new JSHandle instances.
export type JSHandleFactory = (handleId: string) => RemotePuppeteerJSHandle;

JSHandleRpcSender

Source: sdk/src/drivers/puppeteer/generated/js-handle.ts RPC sender function type for JSHandle operations.
export type JSHandleRpcSender = <T = unknown>(method: string, args: unknown[]) => Promise<T>;

LocatorFactory

Source: sdk/src/drivers/puppeteer/generated/locator.ts Factory function for creating locators
export type LocatorFactory = (selector: string) => RemotePuppeteerLocator;

LocatorMapper

Source: sdk/src/drivers/puppeteer/generated/locator.ts Mapper function for map()
export type LocatorMapper<T, S> = (value: T) => S | Promise<S>;

LocatorPredicate

Source: sdk/src/drivers/puppeteer/generated/locator.ts Predicate function for filter()
export type LocatorPredicate<T, S extends T = T> = (value: T) => value is S;

PuppeteerEvalAllFunction

Source: sdk/src/drivers/puppeteer/types.ts
export type PuppeteerEvalAllFunction<T = unknown> = EvaluateFunc<Element[], T>;

PuppeteerEvalFunction

Source: sdk/src/drivers/puppeteer/types.ts
export type PuppeteerEvalFunction<T = unknown> = EvaluateFunc<Element, T>;

PuppeteerEvaluateFunction

Source: sdk/src/drivers/puppeteer/types.ts
export type PuppeteerEvaluateFunction<T = unknown> = EvaluateFunc<void, T>;

External Re-exports

ExportKindSourceNotes
PuppeteerActionOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerAutofillDatatypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerBoundingBoxtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerBoxModeltypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerBrowserContextEventtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerBrowserContextOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerBrowserEventtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerClickOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerClipRegiontypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerConsoleMessagetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerConsoleMessageLocationtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerConsoleMessageTypetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerContinueRequestOverridestypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCookietypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCookieDatatypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCookiePartitionKeytypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCookiePrioritytypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCookieSameSitetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCookieSourceSchemetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCoverageEntrytypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCoverageRangetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCreditCardtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerCSSCoverageOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerDeleteCookiesRequesttypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerDevicetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerDialogtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerDialogTypetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerDownloadBehaviortypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerDownloadPolicytypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerDragDatatypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerDragDataItemtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerErrorCodetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerEventTypetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerFrametypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerFrameAddScriptTagOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerFrameAddStyleTagOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerGeolocationtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerGotoOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerHTTPRequesttypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerHTTPResponsetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerIdleOverridestypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerImageFormattypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerInitiatortypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerInitiatorTypetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerInterceptResolutionActiontypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerInterceptResolutionStatetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerJSCoverageEntrytypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerJSCoverageOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerKeyboardTypeOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerKeyDownOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerKeyInputtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerKeyPressOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerLocatorClickOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerLocatorScrollOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerMediaFeaturetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerMouseButtontypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerMouseClickOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerMouseMoveOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerMouseOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerMouseWheelOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerNetworkConditionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerOffsettypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerPageEventtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerPaperFormattypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerPDFMargintypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerPDFOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerPermissiontypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerPointtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerReloadOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerRemoteAddresstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerRemoteObjecttypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerRemoteObjectSubtypetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerRemoteObjectTypetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerResourceTimingtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerResourceTypetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerResponseForRequesttypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerScreenshotCliptypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerScreenshotOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerSecurityDetailstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerSelectOptiontypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerSelectValuetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerSerializedAXNodeinterfacepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerSerializedElementtypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerSnapshotOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerTargettypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerTargetFiltertypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerTargetTypetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerTouchHandletypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerTracingOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerViewporttypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerVisibilityOptiontypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerVisionDeficiencytypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWaitForNavigationOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWaitForNetworkIdleOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWaitForOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWaitForSelectorOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWaitForTargetOptionstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWaitUntiltypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWaitUntilOptiontypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWebWorkertypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWindowBoundstypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source
PuppeteerWindowStatetypepackages/schemas/src/drivers/puppeteer/options.tsRe-exported from non-SDK source