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

Export Index

ExportKindSourceNotes
LocatorChainSteptypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightBoundingBoxResulttypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightBrowserinterfacesdk/src/drivers/playwright/types.ts-
PlaywrightBrowserContextinterfacesdk/src/drivers/playwright/types.ts-
PlaywrightCheckOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightClickOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightFillOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightFocusOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGetAttributeOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGetByAltTextOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGetByLabelOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGetByPlaceholderOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGetByRoleOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGetByTextOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGetByTitleOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGoBackOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGoForwardOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGotoOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightHoverOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightInnerHTMLOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightInnerTextOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightInputValueOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightIsOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightKeyboardinterfacesdk/src/drivers/playwright/types.ts-
PlaywrightKeyboardOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightLocatorinterfacesdk/src/drivers/playwright/types.ts-
PlaywrightLocatorFilterOptionsinterfacesdk/src/drivers/playwright/types.ts-
PlaywrightLocatorOptionsinterfacesdk/src/drivers/playwright/types.ts-
PlaywrightMouseinterfacesdk/src/drivers/playwright/types.ts-
PlaywrightMouseClickOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightMouseMoveOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightNewContextOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightNewPageOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightPageinterfacesdk/src/drivers/playwright/types.ts-
PlaywrightPageScreenshotOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightPDFOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightPressOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightReloadOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightScreenshotOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightSelectOptionOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightSessionclasssdk/src/drivers/playwright/session.ts-
PlaywrightTextContentOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightTypeOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightWaitForLoadStateOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightWaitForOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightWaitForSelectorOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightWaitForURLOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
RemotePlaywrightAPIRequestContextclasssdk/src/drivers/playwright/generated/api-request-context.tsRemotePlaywrightAPIRequestContext - Remote Playwright APIRequestContext API over RPC.
RemotePlaywrightAPIResponseclasssdk/src/drivers/playwright/generated/api-response.tsRemotePlaywrightAPIResponse - Remote Playwright APIResponse API over RPC.
RemotePlaywrightBrowserclasssdk/src/drivers/playwright/generated/browser.tsRemotePlaywrightBrowser - Remote Playwright Browser API over RPC.
RemotePlaywrightBrowserContextclasssdk/src/drivers/playwright/generated/browser-context.tsRemotePlaywrightBrowserContext - Remote Playwright BrowserContext API over RPC.
RemotePlaywrightClockclasssdk/src/drivers/playwright/generated/clock.tsRemotePlaywrightClock - Remote Playwright Clock API over RPC.
RemotePlaywrightConsoleMessageclasssdk/src/drivers/playwright/generated/console-message.tsRemotePlaywrightConsoleMessage - Remote Playwright ConsoleMessage API over RPC.
RemotePlaywrightCoverageclasssdk/src/drivers/playwright/generated/coverage.tsRemotePlaywrightCoverage - Remote Playwright Coverage API over RPC.
RemotePlaywrightDialogclasssdk/src/drivers/playwright/generated/dialog.tsRemotePlaywrightDialog - Remote Playwright Dialog API over RPC.
RemotePlaywrightElementHandleclasssdk/src/drivers/playwright/generated/element-handle.tsRemotePlaywrightElementHandle - Remote Playwright ElementHandle API over RPC.
RemotePlaywrightFrameclasssdk/src/drivers/playwright/generated/frame.tsRemotePlaywrightFrame - Remote Playwright Frame API over RPC.
RemotePlaywrightJSHandleclasssdk/src/drivers/playwright/generated/js-handle.tsRemotePlaywrightJSHandle - Remote Playwright JSHandle API over RPC.
RemotePlaywrightKeyboardclasssdk/src/drivers/playwright/generated/keyboard.tsRemotePlaywrightKeyboard - Remote Playwright Keyboard API over RPC.
RemotePlaywrightLocatorclasssdk/src/drivers/playwright/generated/locator.tsRemotePlaywrightLocator - Remote Playwright Locator API over RPC.
RemotePlaywrightMouseclasssdk/src/drivers/playwright/generated/mouse.tsRemotePlaywrightMouse - Remote Playwright Mouse API over RPC.
RemotePlaywrightPageclasssdk/src/drivers/playwright/generated/page.tsRemotePlaywrightPage - Remote Playwright Page API over RPC.
RemotePlaywrightTouchscreenclasssdk/src/drivers/playwright/generated/touchscreen.tsRemotePlaywrightTouchscreen - Remote Playwright Touchscreen API over RPC.
RemotePlaywrightTracingclasssdk/src/drivers/playwright/generated/tracing.tsRemotePlaywrightTracing - Remote Playwright Tracing API over RPC.
RemotePlaywrightWorkerclasssdk/src/drivers/playwright/generated/worker.tsRemotePlaywrightWorker - Remote Playwright Worker API over RPC.

Classes

PlaywrightSession

Source: sdk/src/drivers/playwright/session.ts
class PlaywrightSession extends BaseSession<RemotePlaywrightPage, PlaywrightScriptPage>

Constructor

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

Properties

NameTypeNotes
browserRemotePlaywrightBrowsergetter • Get browser instance (Playwright API).
browserContextRemotePlaywrightBrowserContextgetter • Get default browser context (Playwright API). This is a synchronous getter that creates a context from the known context ID.
contextPlaywrightContextgetter • Context for multi-page management (like stagehand.context).
pageRemotePlaywrightPagegetter • Get default page (Playwright API).

Methods

getDefaultContext
Get default context (Playwright API) - async version. Note: contexts() returns a Promise in this SDK.
getDefaultContext(): Promise<RemotePlaywrightBrowserContext>
getPages
Get all pages (convenience method). Note: Returns a Promise since pages() is async.
getPages(): Promise<RemotePlaywrightPage[]>

RemotePlaywrightAPIRequestContext

Source: sdk/src/drivers/playwright/generated/api-request-context.ts
class RemotePlaywrightAPIRequestContext extends RemoteComponentBase
RemotePlaywrightAPIRequestContext - Remote Playwright APIRequestContext API over RPC.

Constructor

new (sendRpc: SimpleRpcSender)

Methods

delete
Sends HTTP(S) DELETE request and returns its response.
delete(url: string, options?: PlaywrightAPIRequestOptions): Promise<PlaywrightAPIResponse>
dispose
All responses returned by this context will be disposed of and no longer accessible.
dispose(options?: { reason?: string }): Promise<void>
fetch
Sends HTTP(S) request and returns its response.
fetch(urlOrRequest: string, options?: PlaywrightAPIRequestOptions): Promise<PlaywrightAPIResponse>
get
Sends HTTP(S) GET request and returns its response.
get(url: string, options?: PlaywrightAPIRequestOptions): Promise<PlaywrightAPIResponse>
head
Sends HTTP(S) HEAD request and returns its response.
head(url: string, options?: PlaywrightAPIRequestOptions): Promise<PlaywrightAPIResponse>
patch
Sends HTTP(S) PATCH request and returns its response.
patch(url: string, options?: PlaywrightAPIRequestOptions): Promise<PlaywrightAPIResponse>
post
Sends HTTP(S) POST request and returns its response.
post(url: string, options?: PlaywrightAPIRequestOptions): Promise<PlaywrightAPIResponse>
put
Sends HTTP(S) PUT request and returns its response.
put(url: string, options?: PlaywrightAPIRequestOptions): Promise<PlaywrightAPIResponse>
storageState
Returns storage state for this request context.
storageState(options?: PlaywrightStorageStateOptions): Promise<PlaywrightStorageState>

RemotePlaywrightAPIResponse

Source: sdk/src/drivers/playwright/generated/api-response.ts
class RemotePlaywrightAPIResponse extends RemoteBase
RemotePlaywrightAPIResponse - Remote Playwright APIResponse API over RPC.

Constructor

new (sendRpc: SimpleRpcSender, data: SerializedAPIResponse)

Methods

body
Returns the buffer with response body.
body(): Promise<Buffer>
dispose
Disposes the body of this response.
dispose(): Promise<void>
headers
An object with all the response HTTP headers associated with this response.
headers(): Record<string, string>
headersArray
An array with all the response HTTP headers associated with this response.
headersArray(): Array<{ name: string; value: string }>
json
Returns the JSON representation of response body.
json(): Promise<unknown>
ok
Contains a boolean stating whether the response was successful (status in the range 200-299) or not.
ok(): boolean
status
Contains the status code of the response (e.g., 200 for a success).
status(): number
statusText
Contains the status text of the response (e.g., “OK” for a success).
statusText(): string
text
Returns the text representation of response body.
text(): Promise<string>
url
Contains the URL of the response.
url(): string

RemotePlaywrightBrowser

Source: sdk/src/drivers/playwright/generated/browser.ts
class RemotePlaywrightBrowser extends RemoteBase
RemotePlaywrightBrowser - Remote Playwright Browser API over RPC.

Constructor

new (id: string, sendRpc: SimpleRpcSender, createBrowserContext: (id: string) => RemotePlaywrightBrowserContext, createPage: (id: string) => RemotePlaywrightPage)

Methods

browserType
Get the browser type name (chromium, firefox, or webkit) that was used to launch this browser.
browserType(): Promise<'chromium' | 'firefox' | 'webkit'>
close
Closes the browser and all of its pages (if any were opened).
close(options?: { reason?: string }): Promise<void>
contexts
Returns an array of all open browser contexts.
contexts(): Promise<RemotePlaywrightBrowserContext[]>
isConnected
Indicates that the browser is connected.
isConnected(): Promise<boolean>
newBrowserCDPSession
Returns the newly created browser session.
newBrowserCDPSession(): Promise<{ sessionId: string }>
newContext
Creates a new browser context. It will not share cookies/cache with other browser contexts.
newContext(options?: PlaywrightNewContextOptions): Promise<RemotePlaywrightBrowserContext>
newPage
Creates a new page in a new browser context. Closing this page will close the context as well.
newPage(options?: PlaywrightNewPageOptions): Promise<RemotePlaywrightPage>
removeAllListeners
Removes all listeners for the specified event, or all events if no event is specified.
removeAllListeners(event?: string): this
startTracing
Starts Chromium Tracing.
startTracing(page?: HasHandleId, options?: PlaywrightStartTracingOptions): Promise<void>
stopTracing
Stops Chromium Tracing and returns the trace data.
stopTracing(): Promise<Buffer>
version
Returns the browser version.
version(): Promise<string>

RemotePlaywrightBrowserContext

Source: sdk/src/drivers/playwright/generated/browser-context.ts
class RemotePlaywrightBrowserContext extends RemoteBase
RemotePlaywrightBrowserContext - Remote Playwright BrowserContext API over RPC.

Constructor

new (id: string, sendRpc: SimpleRpcSender, createPage: (id: string) => RemotePlaywrightPage, browserRef: RemotePlaywrightBrowser | null)

Properties

NameTypeNotes
clockRemotePlaywrightClockgetter • Playwright Clock API for mocking time.
requestRemotePlaywrightAPIRequestContextgetter • API testing helper associated with this context.
tracingRemotePlaywrightTracinggetter • Tracing helper for recording execution traces.

Methods

addCookies
Adds cookies into this browser context. All pages within this context will have these cookies installed.
addCookies(cookies: PlaywrightCookie[]): Promise<void>
addInitScript
Adds a script which would be evaluated in one of the following scenarios: whenever a page is created in the context or navigated.
addInitScript(script: Function | string | { path?: string; content?: string }, arg?: unknown): Promise<void>
addListener
addListener(event: string, handler: (event: unknown) => void): this
backgroundPages
Returns all background pages in the context.
backgroundPages(): Promise<RemotePlaywrightPage[]>
browser
Returns the browser this context belongs to.
browser(): RemotePlaywrightBrowser | null
clearCookies
Removes cookies from context. Accepts optional filter to remove specific cookies.
clearCookies(options?: PlaywrightClearCookiesOptions): Promise<void>
clearPermissions
Clears all permission overrides for the browser context.
clearPermissions(): Promise<void>
close
Closes the browser context. All the pages that belong to the browser context will be closed.
close(options?: { reason?: string }): Promise<void>
cookies
Returns cookies for the specified URLs, or all cookies if no URLs are specified.
cookies(urls?: string | string[]): Promise<PlaywrightCookie[]>
emit
emit(event: string, payload: unknown): boolean
exposeBinding
Adds a function called name on the window object of every frame in every page in the context.
exposeBinding(name: string, callback: Function, options?: { handle?: boolean }): Promise<void>
grantPermissions
Grants specified permissions to the browser context.
grantPermissions(permissions: PlaywrightPermission[], options?: PlaywrightGrantPermissionsOptions): Promise<void>
listenerCount
listenerCount(event: string): number
newCDPSession
Returns the newly created CDP session attached to the given page.
newCDPSession(page: HasHandleId): Promise<{ sessionId: string }>
newPage
Creates a new page in the browser context.
newPage(): Promise<RemotePlaywrightPage>
off
off(event: string, handler?: (event: unknown) => void): this
on
on(event: string, handler: (event: unknown) => void): this
once
once(event: string, handler: (event: unknown) => void): this
pages
Returns all open pages in the context.
pages(): Promise<RemotePlaywrightPage[]>
removeAllListeners
Removes all listeners for the specified event, or all events if no event is specified.
removeAllListeners(event?: string): this
removeListener
removeListener(event: string, handler: (event: unknown) => void): this
route
Routing provides the capability to modify network requests that are made by any page in the browser context.
route(url: string | RegExp | ((url: URL) => boolean), handler: Function, options?: PlaywrightRouteOptions): Promise<void>
routeFromHAR
If specified, network requests that are made in the context will be served from the HAR file.
routeFromHAR(har: string, options?: PlaywrightRouteFromHAROptions): Promise<void>
routeWebSocket
Allows modifying WebSocket connections made by pages in the context.
routeWebSocket(url: string | RegExp | ((url: URL) => boolean), handler: Function): Promise<void>
serviceWorkers
Returns all service workers in the context.
serviceWorkers(): Promise<Array<{ url: string; workerId: string }>>
setDefaultNavigationTimeout
Sets the default maximum navigation timeout.
setDefaultNavigationTimeout(timeout: number): Promise<void>
setDefaultTimeout
Sets the default maximum time for all methods accepting timeout option.
setDefaultTimeout(timeout: number): Promise<void>
setExtraHTTPHeaders
Sets extra HTTP headers that will be sent with every request in the context.
setExtraHTTPHeaders(headers: Record<string, string>): Promise<void>
setGeolocation
Sets the contexts geolocation. Passing null clears geolocation.
setGeolocation(geolocation: PlaywrightGeolocation | null): Promise<void>
setHTTPCredentials
Sets HTTP credentials for HTTP authentication.
setHTTPCredentials(httpCredentials: PlaywrightHttpCredentials | null): Promise<void>
setOffline
Sets whether to emulate network being offline for the browser context.
setOffline(offline: boolean): Promise<void>
storageState
Returns storage state for this browser context.
storageState(options?: { path?: string }): Promise<PlaywrightStorageState>
unroute
Removes a route created with browserContext.route(). When handler is not specified, removes all routes for the url.
unroute(url: string | RegExp | ((url: URL) => boolean), handler?: Function): Promise<void>
unrouteAll
Removes all routes created with browserContext.route() and browserContext.routeFromHAR().
unrouteAll(options?: PlaywrightUnrouteAllOptions): Promise<void>
waitForEvent
Waits for event to fire and passes its value into the predicate function.
waitForEvent<T = unknown>(event: string, optionsOrPredicate?: PlaywrightWaitForEventOptions | ((event: unknown) => boolean)): Promise<T>

RemotePlaywrightClock

Source: sdk/src/drivers/playwright/generated/clock.ts
class RemotePlaywrightClock extends RemoteComponentBase
RemotePlaywrightClock - Remote Playwright Clock API over RPC.

Constructor

new (sendRpc: SimpleRpcSender, contextId: string)

Methods

fastForward
Advances the clock by jumping forward in time.
fastForward(ticks: number | string): Promise<void>
install
Install fake implementations for time-related functions.
install(options?: { time?: number | string | Date }): Promise<void>
pauseAt
Advances the clock by jumping forward in time and pause the time.
pauseAt(time: number | string | Date): Promise<void>
resume
Resumes timers that were paused.
resume(): Promise<void>
runFor
Advances the clock by specified time, firing all timers in the process.
runFor(ticks: number | string): Promise<void>
setFixedTime
Makes Date.now() and new Date() return a fixed fake time.
setFixedTime(time: number | string | Date): Promise<void>
setSystemTime
Sets current system time but does not trigger any timers.
setSystemTime(time: number | string | Date): Promise<void>

RemotePlaywrightConsoleMessage

Source: sdk/src/drivers/playwright/generated/console-message.ts
class RemotePlaywrightConsoleMessage
RemotePlaywrightConsoleMessage - Remote Playwright ConsoleMessage API over RPC.

Constructor

new (sendRpc: SimpleRpcSender, data: SerializedConsoleMessage, createJSHandle: (id: string) => RemotePlaywrightJSHandle, createPage: (id: string) => RemotePlaywrightPage, createWorker: (id: string) => RemotePlaywrightWorker)

Methods

args
List of arguments passed to a console function call.
args(): RemotePlaywrightJSHandle[]
location
Source location of the console message.
location(): PlaywrightConsoleMessageLocation
page
The page that produced this console message, if any.
page(): RemotePlaywrightPage | null
text
The text of the console message.
text(): string
type
The type of the console message.
type(): PlaywrightConsoleMessageType
worker
The web worker or service worker that produced this console message, if any.
worker(): RemotePlaywrightWorker | null

RemotePlaywrightCoverage

Source: sdk/src/drivers/playwright/generated/coverage.ts
class RemotePlaywrightCoverage extends RemoteComponentBase
RemotePlaywrightCoverage - Remote Playwright Coverage API over RPC.

Constructor

new (sendRpc: SimpleRpcSender, pageId: string)

Methods

startCSSCoverage
Starts CSS coverage collection.
startCSSCoverage(options?: PlaywrightStartCSSCoverageOptions): Promise<void>
startJSCoverage
Starts JavaScript coverage collection.
startJSCoverage(options?: PlaywrightStartJSCoverageOptions): Promise<void>
stopCSSCoverage
Stops CSS coverage collection and returns the coverage reports.
stopCSSCoverage(): Promise<PlaywrightCSSCoverageEntry[]>
stopJSCoverage
Stops JavaScript coverage collection and returns the coverage reports.
stopJSCoverage(): Promise<PlaywrightJSCoverageEntry[]>

RemotePlaywrightDialog

Source: sdk/src/drivers/playwright/generated/dialog.ts
class RemotePlaywrightDialog
RemotePlaywrightDialog - Remote Playwright Dialog API over RPC.

Constructor

new (sendRpc: SimpleRpcSender, data: SerializedDialog, createPage: (id: string) => RemotePlaywrightPage)

Methods

accept
Accepts the dialog.
accept(promptText?: string): Promise<void>
defaultValue
Returns the default prompt value if the dialog is a prompt.
defaultValue(): string
dismiss
Dismisses the dialog.
dismiss(): Promise<void>
message
Returns the message displayed in the dialog.
message(): string
page
Returns the page that initiated the dialog, or null if not available.
page(): RemotePlaywrightPage | null
type
Returns the type of the dialog.
type(): PlaywrightDialogType

RemotePlaywrightElementHandle

Source: sdk/src/drivers/playwright/generated/element-handle.ts
class RemotePlaywrightElementHandle extends RemoteBase
RemotePlaywrightElementHandle - Remote Playwright ElementHandle API over RPC.

Constructor

new (id: string, sendRpc: SimpleRpcSender, createElementHandle: (handleId: string) => RemotePlaywrightElementHandle, createFrame: (frameId: string) => RemotePlaywrightFrame, createJSHandle: (handleId: string) => RemotePlaywrightJSHandle)

Methods

$
Query for a child element matching the selector.
$(selector: string): Promise<RemotePlaywrightElementHandle | null>
$$
Query for all child elements matching the selector.
$$(selector: string): Promise<RemotePlaywrightElementHandle[]>
$$eval
Evaluate a function on all child elements matching the selector.
$$eval<R = unknown, Arg = unknown>(selector: string, pageFunction: string | ((elements: Element[], arg: Arg) => R | Promise<R>), arg?: unknown): Promise<R>
$eval
Evaluate a function on a child element matching the selector.
$eval<R = unknown, Arg = unknown>(selector: string, pageFunction: string | ((element: Element, arg: Arg) => R | Promise<R>), arg?: unknown): Promise<R>
asElement
Return this handle as an ElementHandle. Since this is already an ElementHandle, returns itself.
asElement(): RemotePlaywrightElementHandle | null
boundingBox
Get the bounding box of the element.
boundingBox(): Promise<PlaywrightBoundingBox | null>
check
Check a checkbox or radio element.
check(options?: PlaywrightCheckOptions): Promise<void>
click
Click the element.
click(options?: PlaywrightClickOptions): Promise<void>
contentFrame
Get the content frame for iframe elements.
contentFrame(): Promise<RemotePlaywrightFrame | null>
dblclick
Double-click the element.
dblclick(options?: PlaywrightClickOptions): Promise<void>
dispatchEvent
Dispatch a DOM event on the element.
dispatchEvent(type: string, eventInit?: PlaywrightEventInit): Promise<void>
dispose
Dispose of the handle, releasing it from the browser.
dispose(): Promise<void>
evaluate
Evaluate a function in the context of the element.
evaluate<R = unknown, Arg = unknown>(pageFunction: string | ((element: Element, arg: Arg) => R | Promise<R>), arg?: unknown): Promise<R>
evaluateHandle
Evaluate a function and return a JSHandle to the result.
evaluateHandle<R = unknown, Arg = unknown>(pageFunction: string | ((element: Element, arg: Arg) => R | Promise<R>), arg?: unknown): Promise<unknown>
fill
Fill an input, textarea, or contenteditable element with the specified value.
fill(value: string, options?: PlaywrightFillOptions): Promise<void>
focus
Focus the element.
focus(): Promise<void>
getAttribute
Get an attribute value of the element.
getAttribute(name: string): Promise<string | null>
getProperty
Get a JSHandle for a property of this element.
getProperty(propertyName: string): Promise<unknown>
hover
Hover over the element.
hover(options?: PlaywrightHoverOptions): Promise<void>
innerHTML
Get the innerHTML of the element.
innerHTML(): Promise<string>
innerText
Get the innerText of the element.
innerText(): Promise<string>
inputValue
Get the input value for input, textarea, or select elements.
inputValue(options?: PlaywrightTimeoutOptions): Promise<string>
isChecked
Check if a checkbox or radio is checked.
isChecked(): Promise<boolean>
isDisabled
Check if the element is disabled.
isDisabled(): Promise<boolean>
isEditable
Check if the element is editable.
isEditable(): Promise<boolean>
isEnabled
Check if the element is enabled.
isEnabled(): Promise<boolean>
isHidden
Check if the element is hidden.
isHidden(): 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>
ownerFrame
Get the frame that owns this element.
ownerFrame(): Promise<RemotePlaywrightFrame | null>
press
Focus the element and press a key or key combination.
press(key: string, options?: PlaywrightPressOptions): Promise<void>
scrollIntoViewIfNeeded
Scroll the element into view if not already visible.
scrollIntoViewIfNeeded(options?: PlaywrightTimeoutOptions): Promise<void>
selectOption
Select one or more options in a <select> element.
selectOption(values: string | string[] | PlaywrightSelectOption | PlaywrightSelectOption[], options?: PlaywrightSelectOptionOptions): Promise<string[]>
setChecked
Check or uncheck a checkbox or radio element.
setChecked(checked: boolean, options?: PlaywrightCheckOptions): Promise<void>
setInputFiles
Set the files for a file input element.
setInputFiles(files: string | string[] | PlaywrightFilePayload | PlaywrightFilePayload[], options?: PlaywrightSetInputFilesOptions): Promise<void>
tap
Tap the element (for touch devices).
tap(options?: PlaywrightTapOptions): Promise<void>
textContent
Get the textContent of the element.
textContent(): Promise<string | null>
type
Focus the element and type text into it character by character.
type(text: string, options?: PlaywrightTypeOptions): Promise<void>
uncheck
Uncheck a checkbox element.
uncheck(options?: PlaywrightCheckOptions): Promise<void>
waitForElementState
Wait for the element to reach a specific state.
waitForElementState(state: PlaywrightElementState, options?: PlaywrightTimeoutOptions): Promise<void>
waitForSelector
Wait for a child element matching the selector.
waitForSelector(selector: string, options?: PlaywrightWaitForSelectorOptions): Promise<RemotePlaywrightElementHandle | null>

RemotePlaywrightFrame

Source: sdk/src/drivers/playwright/generated/frame.ts
class RemotePlaywrightFrame extends RemoteBase
RemotePlaywrightFrame - Remote Playwright Frame API over RPC.

Constructor

new (id: string, sendRpc: SimpleRpcSender, createElementHandle: (handleId: string) => RemotePlaywrightElementHandle, createFrame: (frameId: string) => RemotePlaywrightFrame, createLocator: (selector: string) => RemotePlaywrightLocator, createFrameLocator: (selector: string) => RemotePlaywrightFrameLocator, createJSHandle: (handleId: string) => RemotePlaywrightJSHandle, getPage: () => RemotePlaywrightPage)

Properties

NameTypeNotes
_isDetachedbooleanWhether this frame has been detached.

Methods

$
Returns the ElementHandle pointing to the frame element.
$(selector: string): Promise<RemotePlaywrightElementHandle | null>
$$
Returns the ElementHandles pointing to the frame elements.
$$(selector: string): Promise<RemotePlaywrightElementHandle[]>
$$eval
Finds all elements matching selector and passes them to pageFunction.
$$eval<R = unknown>(selector: string, pageFunction: string | ((elements: Element[], ...args: unknown[]) => R | Promise<R>), arg?: unknown): Promise<R>
$eval
Finds an element matching selector and passes it to pageFunction.
$eval<R = unknown>(selector: string, pageFunction: string | ((element: Element, ...args: unknown[]) => R | Promise<R>), arg?: unknown): Promise<R>
addScriptTag
Adds a <script> tag into the page with the desired url or content.
addScriptTag(options?: { content?: string; path?: string; type?: string; url?: string }): Promise<RemotePlaywrightElementHandle>
addStyleTag
Adds a <style> tag into the page with the desired url or content.
addStyleTag(options?: { content?: string; path?: string; url?: string }): Promise<RemotePlaywrightElementHandle>
check
Checks a checkbox or radio element.
check(selector: string, options?: PlaywrightCheckOptions): Promise<void>
childFrames
Returns child frames of this frame.
childFrames(): Promise<RemotePlaywrightFrame[]>
click
Clicks an element matching selector.
click(selector: string, options?: PlaywrightClickOptions): Promise<void>
content
Gets the full HTML contents of the frame, including the doctype.
content(): Promise<string>
dblclick
Double-clicks an element matching selector.
dblclick(selector: string, options?: PlaywrightClickOptions): Promise<void>
dispatchEvent
Dispatches an event on the element.
dispatchEvent(selector: string, type: string, eventInit?: unknown, options?: { strict?: boolean; timeout?: number }): Promise<void>
dragAndDrop
Drags source element to target element.
dragAndDrop(source: string, target: string, options?: { force?: boolean; noWaitAfter?: boolean; sourcePosition?: { x: number; y: number }; strict?: boolean; targetPosition?: { x: number; y: number }; timeout?: number; trial?: boolean }): Promise<void>
evaluate
Evaluates JavaScript in the frame context.
evaluate<R = unknown>(pageFunction: string | ((...args: unknown[]) => R | Promise<R>), arg?: unknown): Promise<R>
evaluateHandle
Evaluates a function in the frame’s context and returns a handle to the result. Note: Returns serialized handle reference. Full JSHandle support not yet available.
evaluateHandle<R = unknown>(pageFunction: string | ((...args: unknown[]) => R | Promise<R>), arg?: unknown): Promise<RemotePlaywrightJSHandle>
fill
Fills a form field with text.
fill(selector: string, value: string, options?: PlaywrightFillOptions): Promise<void>
focus
Fetches the element matching selector and focuses it.
focus(selector: string, options?: PlaywrightFocusOptions): Promise<void>
frameElement
Returns the frame element associated with this frame.
frameElement(): Promise<RemotePlaywrightElementHandle>
frameLocator
Returns a FrameLocator for the given selector.
frameLocator(selector: string): RemotePlaywrightFrameLocator
getAttribute
Returns element attribute value.
getAttribute(selector: string, name: string, options?: PlaywrightGetAttributeOptions): Promise<string | null>
getByAltText
Allows locating elements by their alt text.
getByAltText(text: string | RegExp, options?: PlaywrightGetByAltTextOptions): RemotePlaywrightLocator
getByLabel
Allows locating input elements by the text of the associated label.
getByLabel(text: string | RegExp, options?: PlaywrightGetByLabelOptions): RemotePlaywrightLocator
getByPlaceholder
Allows locating input elements by the placeholder text.
getByPlaceholder(text: string | RegExp, options?: PlaywrightGetByPlaceholderOptions): RemotePlaywrightLocator
getByRole
Allows locating elements by their ARIA role, ARIA attributes and accessible name.
getByRole(role: "alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem", options?: PlaywrightGetByRoleOptions): RemotePlaywrightLocator
getByTestId
Locate element by the test id.
getByTestId(testId: string | RegExp): RemotePlaywrightLocator
getByText
Allows locating elements that contain given text.
getByText(text: string | RegExp, options?: PlaywrightGetByTextOptions): RemotePlaywrightLocator
getByTitle
Allows locating elements by their title attribute.
getByTitle(text: string | RegExp, options?: PlaywrightGetByTitleOptions): RemotePlaywrightLocator
goto
Returns the main resource response.
goto(url: string, options?: PlaywrightGotoOptions): Promise<SerializedHandle | null>
hover
Hovers over an element matching selector.
hover(selector: string, options?: PlaywrightHoverOptions): Promise<void>
innerHTML
Returns the element.innerHTML.
innerHTML(selector: string, options?: PlaywrightInnerHTMLOptions): Promise<string>
innerText
Returns the element.innerText.
innerText(selector: string, options?: PlaywrightInnerTextOptions): Promise<string>
inputValue
Returns input.value for the selected <input> or <textarea> or <select> element.
inputValue(selector: string, options?: PlaywrightInputValueOptions): Promise<string>
isChecked
Returns whether the element is checked.
isChecked(selector: string, options?: PlaywrightIsOptions): Promise<boolean>
isDetached
Returns true if the frame has been detached, or false otherwise.
isDetached(): boolean
isDisabled
Returns whether the element is disabled.
isDisabled(selector: string, options?: PlaywrightIsOptions): Promise<boolean>
isEditable
Returns whether the element is editable.
isEditable(selector: string, options?: PlaywrightIsOptions): Promise<boolean>
isEnabled
Returns whether the element is enabled.
isEnabled(selector: string, options?: PlaywrightIsOptions): Promise<boolean>
isHidden
Returns whether the element is hidden.
isHidden(selector: string, options?: PlaywrightIsOptions): Promise<boolean>
isVisible
Returns whether the element is visible.
isVisible(selector: string, options?: PlaywrightIsOptions): Promise<boolean>
locator
Creates a Locator for the given selector.
locator(selector: string, options?: { has?: RemotePlaywrightLocator; hasNot?: RemotePlaywrightLocator; hasText?: string | RegExp; hasNotText?: string | RegExp }): RemotePlaywrightLocator
name
Returns frame’s name attribute as specified in the tag.
name(): Promise<string>
page
The page associated with this frame.
page(): RemotePlaywrightPage
parentFrame
Parent frame, if any. Detached frames and main frames return null.
parentFrame(): Promise<RemotePlaywrightFrame | null>
press
Presses a key.
press(selector: string, key: string, options?: PlaywrightPressOptions): Promise<void>
selectOption
Selects option(s) in the select element.
selectOption(selector: string, values: string | string[] | { value?: string; label?: string; index?: number } | { value?: string; label?: string; index?: number }[] | null, options?: PlaywrightSelectOptionOptions): Promise<string[]>
setChecked
Checks or unchecks a checkbox or radio element.
setChecked(selector: string, checked: boolean, options?: PlaywrightCheckOptions): Promise<void>
setContent
Sets the content of the frame.
setContent(html: string, options?: { timeout?: number; waitUntil?: "load" | "domcontentloaded" | "networkidle" | "commit" }): Promise<void>
setInputFiles
Sets the file input element to the given files.
setInputFiles(selector: string, files: string | string[] | { name: string; mimeType: string; buffer: Buffer } | { name: string; mimeType: string; buffer: Buffer }[], options?: { noWaitAfter?: boolean; strict?: boolean; timeout?: number }): Promise<void>
tap
Taps an element matching selector.
tap(selector: string, options?: { force?: boolean; modifiers?: ("Alt" | "Control" | "Meta" | "Shift")[]; noWaitAfter?: boolean; position?: { x: number; y: number }; strict?: boolean; timeout?: number; trial?: boolean }): Promise<void>
textContent
Returns the element.textContent.
textContent(selector: string, options?: PlaywrightTextContentOptions): Promise<string | null>
title
Returns the page title.
title(): Promise<string>
type
Types into an element matching selector.
type(selector: string, text: string, options?: PlaywrightTypeOptions): Promise<void>
uncheck
Unchecks a checkbox element.
uncheck(selector: string, options?: PlaywrightCheckOptions): Promise<void>
url
Returns frame’s URL.
url(): Promise<string>
waitForFunction
Returns when the pageFunction returns a truthy value. Note: Returns serialized handle reference. Full JSHandle support not yet available.
waitForFunction<R = unknown>(pageFunction: string | ((...args: unknown[]) => R | Promise<R>), arg?: unknown, options?: { timeout?: number; polling?: number | 'raf' }): Promise<RemotePlaywrightJSHandle>
waitForLoadState
Waits for the required load state to be reached.
waitForLoadState(state?: "load" | "domcontentloaded" | "networkidle", options?: { timeout?: number }): Promise<void>
waitForSelector
Returns when element specified by selector satisfies state option.
waitForSelector(selector: string, options?: PlaywrightWaitForSelectorOptions): Promise<RemotePlaywrightElementHandle | null>
waitForTimeout
Waits for the given timeout in milliseconds.
waitForTimeout(timeout: number): Promise<void>
waitForURL
Waits for the frame to navigate to the given URL.
waitForURL(url: string | RegExp | ((url: URL) => boolean), options?: PlaywrightWaitForURLOptions): Promise<void>

RemotePlaywrightJSHandle

Source: sdk/src/drivers/playwright/generated/js-handle.ts
class RemotePlaywrightJSHandle extends RemoteBase
RemotePlaywrightJSHandle - Remote Playwright JSHandle API over RPC.

Constructor

new (id: string, sendRpc: SimpleRpcSender, jsHandleFactory: (id: string) => RemotePlaywrightJSHandle)

Methods

dispose
Releases the handle. After calling dispose, the handle is no longer valid.
dispose(): Promise<void>
evaluate
Evaluates the given function with this handle as the first argument.
evaluate<R = unknown>(pageFunction: Function | string, arg?: unknown): Promise<R>
evaluateHandle
Evaluates the given function with this handle as the first argument and returns a JSHandle.
evaluateHandle<R = unknown>(pageFunction: Function | string, arg?: unknown): Promise<unknown>
getProperties
Returns a map of property names to JSHandle instances for own properties of the object.
getProperties(): Promise<Map<string, unknown>>
getProperty
Returns a JSHandle for the property with the given name.
getProperty(propertyName: string): Promise<unknown>
jsonValue
Returns a JSON representation of the object.
jsonValue<T = unknown>(): Promise<T>

RemotePlaywrightKeyboard

Source: sdk/src/drivers/playwright/generated/keyboard.ts
class RemotePlaywrightKeyboard extends RemoteComponentBase
RemotePlaywrightKeyboard - Remote Playwright Keyboard API over RPC.

Constructor

new (sendRpc: SimpleRpcSender)

Methods

down
Dispatches a keydown event.
down(key: string): Promise<void>
insertText
Dispatches only an input event, does not emit keydown, keyup, or keypress events.
insertText(text: string): Promise<void>
press
Shortcut for keyboard.down() and keyboard.up().
press(key: string, options?: PlaywrightKeyboardPressOptions): Promise<void>
type
Sends a keydown, keypress/input, and keyup event for each character in the text.
type(text: string, options?: PlaywrightKeyboardTypeOptions): Promise<void>
up
Dispatches a keyup event.
up(key: string): Promise<void>

RemotePlaywrightLocator

Source: sdk/src/drivers/playwright/generated/locator.ts
class RemotePlaywrightLocator
RemotePlaywrightLocator - Remote Playwright Locator API over RPC.

Constructor

new (selector: string, sendRpc: SimpleRpcSender, createElementHandle: ElementHandleFactory, createLocator: LocatorFactory, createFrameLocator: FrameLocatorFactory, _page: RemotePlaywrightPage, state?: Partial<RemotePlaywrightLocatorState>)

Properties

NameTypeNotes
selectorstringreadonly

Methods

all
Returns array of locators pointing to all matching elements.
all(): Promise<RemotePlaywrightLocator[]>
allInnerTexts
Returns an array of innerText values for all matching elements.
allInnerTexts(): Promise<string[]>
allTextContents
Returns an array of textContent values for all matching elements.
allTextContents(): Promise<string[]>
and
Creates a locator that matches both this locator AND the argument.
and(locator: RemotePlaywrightLocator): RemotePlaywrightLocator
blur
Removes focus from the element.
blur(options?: PlaywrightBlurOptions): Promise<void>
boundingBox
Returns the bounding box of the element, or null if not visible.
boundingBox(options?: PlaywrightBoundingBoxOptions): Promise<PlaywrightBoundingBox | null>
check
Checks a checkbox or radio button.
check(options?: PlaywrightCheckOptions): Promise<void>
clear
Clears the input field.
clear(options?: PlaywrightClearOptions): Promise<void>
click
Clicks on the element.
click(options?: PlaywrightClickOptions): Promise<void>
clone
Clones the locator.
clone(): RemotePlaywrightLocator
contentFrame
Returns a FrameLocator pointing to the iframe this locator points to.
contentFrame(): RemotePlaywrightFrameLocator
count
Returns the number of elements matching this locator.
count(): Promise<number>
dblclick
Double-clicks on the element.
dblclick(options?: PlaywrightDblclickOptions): Promise<void>
dispatchEvent
Programmatically dispatches a DOM event on the element.
dispatchEvent(type: string, eventInit?: Record<string, unknown>, options?: PlaywrightDispatchEventOptions): Promise<void>
dragTo
Drags this element to the target element.
dragTo(target: RemotePlaywrightLocator, options?: PlaywrightDragToOptions): Promise<void>
elementHandle
Resolves to the ElementHandle of the element.
elementHandle(options?: { timeout?: number }): Promise<RemotePlaywrightElementHandle>
elementHandles
Resolves to all ElementHandles matching this locator.
elementHandles(): Promise<RemotePlaywrightElementHandle[]>
evaluate
Evaluates a function in the browser context with the element as first argument.
evaluate<R, Arg = unknown>(pageFunction: string | ((element: Element, arg: Arg) => R | Promise<R>), arg?: Arg, options?: PlaywrightEvaluateOptions): Promise<R>
evaluateAll
Evaluates a function with all matching elements as first argument.
evaluateAll<R, Arg = unknown>(pageFunction: string | ((elements: Element[], arg: Arg) => R | Promise<R>), arg?: Arg): Promise<R>
evaluateHandle
Returns a JSHandle with the result of the evaluation.
evaluateHandle<R, Arg = unknown>(pageFunction: string | ((element: Element, arg: Arg) => R | Promise<R>), arg?: Arg): Promise<unknown>
fill
Fills an input or textarea element with the specified value.
fill(value: string, options?: PlaywrightFillOptions): Promise<void>
filter
Narrows the locator with additional filters.
filter(options?: PlaywrightLocatorFilterOptions): RemotePlaywrightLocator
first
Returns locator to the first matching element.
first(): RemotePlaywrightLocator
focus
Focuses the element.
focus(options?: PlaywrightFocusOptions): Promise<void>
frameLocator
Returns a FrameLocator for an iframe within this element.
frameLocator(selector: string): RemotePlaywrightFrameLocator
getAttribute
Returns the attribute value of the element.
getAttribute(name: string, options?: { timeout?: number }): Promise<string | null>
getByAltText
Locates elements by their alt attribute (typically images).
getByAltText(text: string | RegExp, options?: PlaywrightGetByAltTextOptions): RemotePlaywrightLocator
getByLabel
Locates form elements by their associated label text.
getByLabel(text: string | RegExp, options?: PlaywrightGetByLabelOptions): RemotePlaywrightLocator
getByPlaceholder
Locates input elements by their placeholder text.
getByPlaceholder(text: string | RegExp, options?: PlaywrightGetByPlaceholderOptions): RemotePlaywrightLocator
getByRole
Locates elements by their ARIA role.
getByRole(role: PlaywrightAriaRole, options?: PlaywrightGetByRoleOptions): RemotePlaywrightLocator
getByTestId
Locates elements by their test ID attribute.
getByTestId(testId: string | RegExp): RemotePlaywrightLocator
getByText
Locates elements containing the specified text.
getByText(text: string | RegExp, options?: PlaywrightGetByTextOptions): RemotePlaywrightLocator
getByTitle
Locates elements by their title attribute.
getByTitle(text: string | RegExp, options?: PlaywrightGetByTitleOptions): RemotePlaywrightLocator
highlight
Highlights the element on screen (for debugging).
highlight(): Promise<void>
hover
Hovers over the element.
hover(options?: PlaywrightHoverOptions): Promise<void>
innerHTML
Returns the innerHTML of the element.
innerHTML(options?: { timeout?: number }): Promise<string>
innerText
Returns the innerText of the element.
innerText(options?: { timeout?: number }): Promise<string>
inputValue
Returns the input value for <input>, <textarea>, or <select> elements.
inputValue(options?: { timeout?: number }): Promise<string>
isChecked
Returns whether a checkbox or radio is checked.
isChecked(options?: { timeout?: number }): Promise<boolean>
isDisabled
Returns whether the element is disabled.
isDisabled(options?: { timeout?: number }): Promise<boolean>
isEditable
Returns whether the element is editable.
isEditable(options?: { timeout?: number }): Promise<boolean>
isEnabled
Returns whether the element is enabled.
isEnabled(options?: { timeout?: number }): Promise<boolean>
isHidden
Returns whether the element is hidden.
isHidden(options?: { timeout?: number }): Promise<boolean>
isVisible
Returns whether the element is visible.
isVisible(options?: { timeout?: number }): Promise<boolean>
last
Returns locator to the last matching element.
last(): RemotePlaywrightLocator
locator
Creates a locator matching descendants of this element.
locator(selectorOrLocator: string | RemotePlaywrightLocator, options?: PlaywrightLocatorOptions): RemotePlaywrightLocator
nth
Returns locator to the nth matching element.
nth(index: number): RemotePlaywrightLocator
or
Creates a locator that matches this locator OR the argument.
or(locator: RemotePlaywrightLocator): RemotePlaywrightLocator
page
Returns the Page that this locator belongs to.
page(): RemotePlaywrightPage
press
Presses a single key or key combination.
press(key: string, options?: PlaywrightPressOptions): Promise<void>
pressSequentially
Types text character by character with keydown, keypress, and keyup events.
pressSequentially(text: string, options?: PlaywrightPressSequentiallyOptions): Promise<void>
screenshot
Takes a screenshot of the element.
screenshot(options?: PlaywrightScreenshotOptions): Promise<Buffer>
scrollIntoViewIfNeeded
Scrolls the element into view if not already visible.
scrollIntoViewIfNeeded(options?: PlaywrightScrollIntoViewIfNeededOptions): Promise<void>
selectOption
Selects option(s) in a <select> element.
selectOption(values: string | string[] | PlaywrightSelectOptionValue | PlaywrightSelectOptionValue[], options?: PlaywrightSelectOptionOptions): Promise<string[]>
selectText
Selects all text content of the element.
selectText(options?: { force?: boolean; timeout?: number }): Promise<void>
setChecked
Sets the checked state of a checkbox or radio button.
setChecked(checked: boolean, options?: PlaywrightSetCheckedOptions): Promise<void>
setInputFiles
Sets files for a file input element.
setInputFiles(files: string | string[] | PlaywrightFilePayload | PlaywrightFilePayload[], options?: PlaywrightSetInputFilesOptions): Promise<void>
setTimeout
Sets the timeout for this locator’s actions. Returns a new Locator with the updated timeout.
setTimeout(timeout: number): RemotePlaywrightLocator
tap
Performs a tap gesture on the element.
tap(options?: PlaywrightTapOptions): Promise<void>
textContent
Returns the textContent of the element.
textContent(options?: { timeout?: number }): Promise<string | null>
type
Types text into the element (DEPRECATED - use fill() or pressSequentially()).
type(text: string, options?: { delay?: number; noWaitAfter?: boolean; timeout?: number }): Promise<void>
uncheck
Unchecks a checkbox.
uncheck(options?: PlaywrightUncheckOptions): Promise<void>
waitFor
Waits for element to satisfy the given state.
waitFor(options?: PlaywrightWaitForOptions): Promise<void>

RemotePlaywrightMouse

Source: sdk/src/drivers/playwright/generated/mouse.ts
class RemotePlaywrightMouse extends RemoteComponentBase
RemotePlaywrightMouse - Remote Playwright Mouse API over RPC.

Constructor

new (sendRpc: SimpleRpcSender)

Methods

click
Shortcut for mouse.move(), mouse.down(), mouse.up().
click(x: number, y: number, options?: PlaywrightMouseClickOptions): Promise<void>
dblclick
Shortcut for mouse.move(), mouse.down(), mouse.up(), mouse.down(), mouse.up().
dblclick(x: number, y: number, options?: PlaywrightMouseDblclickOptions): Promise<void>
down
Dispatches a mousedown event.
down(options?: PlaywrightMouseDownUpOptions): Promise<void>
move
Dispatches a mousemove event.
move(x: number, y: number, options?: PlaywrightMouseMoveOptions): Promise<void>
up
Dispatches a mouseup event.
up(options?: PlaywrightMouseDownUpOptions): Promise<void>
wheel
Dispatches a wheel event.
wheel(deltaX: number, deltaY: number): Promise<void>

RemotePlaywrightPage

Source: sdk/src/drivers/playwright/generated/page.ts
class RemotePlaywrightPage extends PlaywrightEventEmitter<PageEvents>
RemotePlaywrightPage - Remote Playwright Page API over RPC.

Constructor

new (sendRpc: SimpleRpcSender, id: string, createElementHandle: (handleId: string) => RemotePlaywrightElementHandle, createFrame: (frameId: string) => RemotePlaywrightFrame, createLocator: (selector: string) => RemotePlaywrightLocator, createJSHandle: (handleId: string) => RemotePlaywrightJSHandle)

Properties

NameTypeNotes
clockRemotePlaywrightClockreadonly
coverageRemotePlaywrightCoveragereadonly
idstringgetter • Get the page ID.
keyboardRemotePlaywrightKeyboardreadonly
mouseRemotePlaywrightMousereadonly
requestRemotePlaywrightAPIRequestContextreadonly
touchscreenRemotePlaywrightTouchscreenreadonly

Methods

$
Query for a single element. Alias for page.querySelector().
$(selector: string): Promise<RemotePlaywrightElementHandle | null>
$$
Query for all matching elements. Alias for page.querySelectorAll().
$$(selector: string): Promise<RemotePlaywrightElementHandle[]>
$$eval
Find all elements matching the selector and evaluate a function on the array of elements.
$$eval<T = unknown>(selector: string, pageFunction: Function | string, arg?: unknown): Promise<T>
$eval
Find an element matching the selector and evaluate a function on it.
$eval<T = unknown>(selector: string, pageFunction: Function | string, arg?: unknown): Promise<T>
addInitScript
Add a script to evaluate before page scripts run.
addInitScript(script: Function | string | { path?: string; content?: string }, arg?: unknown): Promise<void>
addLocatorHandler
Registers a handler that will be called when the specified locator becomes visible.
addLocatorHandler(locator: RemotePlaywrightLocator, handler: (locator: RemotePlaywrightLocator) => Promise<void>, options?: PlaywrightAddLocatorHandlerOptions): Promise<void>
addScriptTag
Add a <script> tag to the page.
addScriptTag(options: PlaywrightAddScriptTagOptions): Promise<RemotePlaywrightElementHandle>
addStyleTag
Add a <style> tag to the page.
addStyleTag(options: PlaywrightAddStyleTagOptions): Promise<RemotePlaywrightElementHandle>
bringToFront
Bring page to front (activate tab).
bringToFront(): Promise<void>
check
Check a checkbox or radio button.
check(selector: string, options?: PlaywrightCheckOptions): Promise<void>
click
Click on an element matching the selector.
click(selector: string, options?: PlaywrightClickOptions): Promise<void>
close
Close the page.
close(options?: { runBeforeUnload?: boolean }): Promise<void>
consoleMessages
Returns all console messages captured during the page lifecycle.
consoleMessages(): Promise<PlaywrightConsoleMessage[]>
content
Get the full HTML content of the page.
content(): Promise<string>
context
Get the browser context.
context(): unknown
dblclick
Double-click on an element matching the selector.
dblclick(selector: string, options?: PlaywrightDblclickOptions): Promise<void>
dispatchEvent
Dispatch a DOM event on an element.
dispatchEvent(selector: string, type: string, eventInit?: Record<string, unknown>, options?: PlaywrightDispatchEventOptions): Promise<void>
dragAndDrop
Drag an element to another element.
dragAndDrop(source: string, target: string, options?: PlaywrightDragAndDropOptions): Promise<void>
emulateMedia
Emulate media type, color scheme, etc.
emulateMedia(options?: PlaywrightEmulateMediaOptions): Promise<void>
evaluate
Evaluate JavaScript in the page context.
evaluate<R = unknown>(pageFunction: Function | string, arg?: unknown): Promise<R>
evaluateHandle
Evaluate JavaScript and return a handle to the result.
evaluateHandle<R = unknown>(pageFunction: Function | string, arg?: unknown): Promise<RemotePlaywrightJSHandle>
exposeBinding
Expose a binding to the page (with source info).
exposeBinding(name: string, callback: Function, options?: { handle?: boolean }): Promise<void>
fill
Fill an input element with the given value.
fill(selector: string, value: string, options?: PlaywrightFillOptions): Promise<void>
focus
Focus on an element.
focus(selector: string, options?: PlaywrightFocusOptions): Promise<void>
frame
Get a frame by name or URL.
frame(frameSelector: string | { name?: string; url?: string | RegExp | ((url: URL) => boolean) }): Promise<RemotePlaywrightFrame | null>
frameLocator
Create a frame locator.
frameLocator(selector: string): RemotePlaywrightLocator
frames
Get all frames attached to the page.
frames(): Promise<RemotePlaywrightFrame[]>
getAttribute
Get an attribute value from an element.
getAttribute(selector: string, name: string, options?: { strict?: boolean; timeout?: number }): Promise<string | null>
getByAltText
Locate elements by alt text.
getByAltText(text: string | RegExp, options?: PlaywrightGetByAltTextOptions): RemotePlaywrightLocator
getByLabel
Locate form controls by their associated label.
getByLabel(text: string | RegExp, options?: PlaywrightGetByLabelOptions): RemotePlaywrightLocator
getByPlaceholder
Locate input elements by placeholder text.
getByPlaceholder(text: string | RegExp, options?: PlaywrightGetByPlaceholderOptions): RemotePlaywrightLocator
getByRole
Locate elements by their ARIA role.
getByRole(role: string, options?: PlaywrightGetByRoleOptions): RemotePlaywrightLocator
getByTestId
Locate elements by data-testid attribute.
getByTestId(testId: string | RegExp): RemotePlaywrightLocator
getByText
Locate elements containing the given text.
getByText(text: string | RegExp, options?: PlaywrightGetByTextOptions): RemotePlaywrightLocator
getByTitle
Locate elements by title attribute.
getByTitle(text: string | RegExp, options?: PlaywrightGetByTitleOptions): RemotePlaywrightLocator
goBack
Navigate back in history.
goBack(options?: PlaywrightNavigationOptions): Promise<PlaywrightResponse | null>
goForward
Navigate forward in history.
goForward(options?: PlaywrightNavigationOptions): Promise<PlaywrightResponse | null>
goto
Navigate to a URL.
goto(url: string, options?: PlaywrightGotoOptions): Promise<PlaywrightResponse | null>
hover
Hover over an element.
hover(selector: string, options?: PlaywrightHoverOptions): Promise<void>
innerHTML
Get the inner HTML of an element.
innerHTML(selector: string, options?: { strict?: boolean; timeout?: number }): Promise<string>
innerText
Get the inner text of an element.
innerText(selector: string, options?: { strict?: boolean; timeout?: number }): Promise<string>
inputValue
Get the input value of an element.
inputValue(selector: string, options?: { strict?: boolean; timeout?: number }): Promise<string>
isChecked
Check if a checkbox is checked.
isChecked(selector: string, options?: { strict?: boolean; timeout?: number }): Promise<boolean>
isClosed
Check if the page is closed.
isClosed(): boolean
isDisabled
Check if an element is disabled.
isDisabled(selector: string, options?: { strict?: boolean; timeout?: number }): Promise<boolean>
isEditable
Check if an element is editable.
isEditable(selector: string, options?: { strict?: boolean; timeout?: number }): Promise<boolean>
isEnabled
Check if an element is enabled.
isEnabled(selector: string, options?: { strict?: boolean; timeout?: number }): Promise<boolean>
isHidden
Check if an element is hidden.
isHidden(selector: string, options?: { strict?: boolean; timeout?: number }): Promise<boolean>
isVisible
Check if an element is visible.
isVisible(selector: string, options?: { strict?: boolean; timeout?: number }): Promise<boolean>
locator
Create a locator for the given selector.
locator(selector: string, options?: PlaywrightLocatorOptions): RemotePlaywrightLocator
mainFrame
Get the main frame.
mainFrame(): Promise<RemotePlaywrightFrame>
markClosed
Mark this page as closed (internal use).
markClosed(): void
opener
Get the page that opened this page (via window.open).
opener(): Promise<RemotePlaywrightPage | null>
pageErrors
Returns all page errors (uncaught exceptions) captured during the page lifecycle.
pageErrors(): Promise<Error[]>
pause
Pause script execution (for debugging).
pause(): Promise<void>
pdf
Generate a PDF of the page (Chromium only).
pdf(options?: PlaywrightPDFOptions): Promise<Buffer>
press
Focus an element and press a key combination.
press(selector: string, key: string, options?: PlaywrightPressOptions): Promise<void>
querySelector
Query for a single element.
querySelector(selector: string): Promise<RemotePlaywrightElementHandle | null>
querySelectorAll
Query for all matching elements.
querySelectorAll(selector: string): Promise<RemotePlaywrightElementHandle[]>
reload
Reload the page.
reload(options?: PlaywrightNavigationOptions): Promise<PlaywrightResponse | null>
removeLocatorHandler
Removes a previously added locator handler.
removeLocatorHandler(locator: RemotePlaywrightLocator): Promise<void>
requestGC
Request garbage collection in the page context.
requestGC(): Promise<void>
requests
Returns all requests made by the page since the last navigation.
requests(): Promise<PlaywrightRequest[]>
route
Route requests matching the URL pattern.
route(url: string | RegExp | ((url: URL) => boolean), handler: PlaywrightRouteHandler, options?: { times?: number }): Promise<void>
routeFromHAR
Serves network requests from a HAR (HTTP Archive) file.
routeFromHAR(har: string, options?: PlaywrightRouteFromHAROptions): Promise<void>
routeWebSocket
Route WebSocket connections matching the URL pattern.
routeWebSocket(url: string | RegExp | ((url: URL) => boolean), handler: (ws: PlaywrightWebSocketRoute) => void | Promise<void>): Promise<void>
screenshot
Take a screenshot of the page.
screenshot(options?: PlaywrightScreenshotOptions): Promise<Buffer>
selectOption
Select one or more options in a <select> element.
selectOption(selector: string, values: string | SelectOption | (string | SelectOption)[], options?: PlaywrightSelectOptionOptions): Promise<string[]>
setChecked
Set the checked state of a checkbox.
setChecked(selector: string, checked: boolean, options?: PlaywrightSetCheckedOptions): Promise<void>
setContent
Set the HTML content of the page.
setContent(html: string, options?: PlaywrightSetContentOptions): Promise<void>
setDefaultNavigationTimeout
Set the default navigation timeout.
setDefaultNavigationTimeout(timeout: number): Promise<void>
setDefaultTimeout
Set the default timeout.
setDefaultTimeout(timeout: number): Promise<void>
setExtraHTTPHeaders
Set extra HTTP headers for all requests.
setExtraHTTPHeaders(headers: Record<string, string>): Promise<void>
setInputFiles
Set input files for a file input element.
setInputFiles(selector: string, files: string | string[] | FilePayload | FilePayload[], options?: PlaywrightSetInputFilesOptions): Promise<void>
setViewportSize
Set the viewport size.
setViewportSize(viewportSize: PlaywrightViewportSize): Promise<void>
tap
Tap on an element (for touch devices).
tap(selector: string, options?: PlaywrightTapOptions): Promise<void>
textContent
Get the text content of an element.
textContent(selector: string, options?: { strict?: boolean; timeout?: number }): Promise<string | null>
title
Get the page title.
title(): Promise<string>
type
Type text into an element (sends keydown, keypress/input, keyup events for each character).
type(selector: string, text: string, options?: PlaywrightTypeOptions): Promise<void>
uncheck
Uncheck a checkbox.
uncheck(selector: string, options?: PlaywrightCheckOptions): Promise<void>
unroute
Remove a route.
unroute(url: string | RegExp | ((url: URL) => boolean), handler?: PlaywrightRouteHandler): Promise<void>
unrouteAll
Remove all routes.
unrouteAll(options?: { behavior?: "wait" | "ignoreErrors" | "default" }): Promise<void>
url
Get the current URL.
url(): Promise<string>
video
Get the video object.
video(): { path: () => Promise<string | null>; saveAs: (path: string) => Promise<void>; delete: () => Promise<void> } | null
viewportSize
Get the viewport size.
viewportSize(): PlaywrightViewportSize | null
waitForEvent
Wait for a specific event to fire.
waitForEvent<K extends keyof PageEvents>(event: K, optionsOrPredicate?: { predicate?: (event: PageEvents[K]) => boolean | Promise<boolean>; timeout?: number } | ((event: PageEvents[K]) => boolean | Promise<boolean>)): Promise<PageEvents[K]>
waitForFunction
Wait for a function to return a truthy value.
waitForFunction(pageFunction: Function | string, arg?: unknown, options?: PlaywrightWaitForFunctionOptions): Promise<unknown>
waitForLoadState
Wait for the required load state to be reached.
waitForLoadState(state?: LoadState, options?: PlaywrightWaitForLoadStateOptions): Promise<void>
waitForNavigation
Wait for the main frame navigation and return the main resource response.
waitForNavigation(options?: PlaywrightWaitForNavigationOptions): Promise<PlaywrightResponse | null>
waitForRequest
Wait for a specific request.
waitForRequest(urlOrPredicate: string | RegExp | ((request: PlaywrightRequest) => boolean | Promise<boolean>), options?: { timeout?: number }): Promise<PlaywrightRequest>
waitForResponse
Wait for a specific response.
waitForResponse(urlOrPredicate: string | RegExp | ((response: PlaywrightResponse) => boolean | Promise<boolean>), options?: { timeout?: number }): Promise<PlaywrightResponse>
waitForSelector
Wait for a selector to appear in the DOM.
waitForSelector(selector: string, options?: PlaywrightWaitForSelectorOptions): Promise<RemotePlaywrightElementHandle | null>
waitForTimeout
Wait for the specified timeout.
waitForTimeout(timeout: number): Promise<void>
waitForURL
Wait for the main frame to navigate to the given URL.
waitForURL(url: string | RegExp | ((url: URL) => boolean), options?: PlaywrightWaitForURLOptions): Promise<void>
workers
Get all web workers in the page.
workers(): unknown[]

RemotePlaywrightTouchscreen

Source: sdk/src/drivers/playwright/generated/touchscreen.ts
class RemotePlaywrightTouchscreen extends RemoteComponentBase
RemotePlaywrightTouchscreen - Remote Playwright Touchscreen API over RPC.

Constructor

new (sendRpc: SimpleRpcSender)

Methods

tap
Dispatches a touchstart and touchend event with a single touch at the position (x, y).
tap(x: number, y: number): Promise<void>

RemotePlaywrightTracing

Source: sdk/src/drivers/playwright/generated/tracing.ts
class RemotePlaywrightTracing extends RemoteComponentBase
RemotePlaywrightTracing - Remote Playwright Tracing API over RPC.

Constructor

new (sendRpc: SimpleRpcSender, contextId: string)

Methods

group
Creates a new trace group. All actions between group and groupEnd will be grouped together.
group(name: string, options?: { location?: { file: string; line?: number; column?: number } }): Promise<void>
groupEnd
Closes the last trace group opened by tracing.group().
groupEnd(): Promise<void>
start
Start tracing to capture browser operations and network activity.
start(options?: PlaywrightTracingStartOptions): Promise<void>
startChunk
Start a new trace chunk.
startChunk(options?: { name?: string; title?: string }): Promise<void>
stop
Stop tracing and export it into a file.
stop(options?: PlaywrightTracingStopOptions): Promise<void>
stopChunk
Stop the current trace chunk and export it.
stopChunk(options?: { path?: string }): Promise<void>

RemotePlaywrightWorker

Source: sdk/src/drivers/playwright/generated/worker.ts
class RemotePlaywrightWorker extends RemoteBase
RemotePlaywrightWorker - Remote Playwright Worker API over RPC.

Constructor

new (sendRpc: SimpleRpcSender, data: SerializedWorker, jsHandleFactory: (id: string) => RemotePlaywrightJSHandle)

Methods

evaluate
Evaluates the given function in the worker context.
evaluate<R = unknown>(pageFunction: Function | string, arg?: unknown): Promise<R>
evaluateHandle
Evaluates the given function in the worker context and returns a JSHandle.
evaluateHandle<R = unknown>(pageFunction: Function | string, arg?: unknown): Promise<unknown>
url
Returns the URL of the worker.
url(): string

Interfaces

PlaywrightBrowser

Source: sdk/src/drivers/playwright/types.ts
export interface PlaywrightBrowser {
  newContext(options?: PlaywrightNewContextOptions): Promise<PlaywrightBrowserContext>;
  newPage(options?: PlaywrightNewPageOptions): Promise<PlaywrightPage>;
  contexts(): PlaywrightBrowserContext[];
  close(): Promise<void>;
  isConnected(): boolean;
  version(): Promise<string>;
}

PlaywrightBrowserContext

Source: sdk/src/drivers/playwright/types.ts
export interface PlaywrightBrowserContext {
  newPage(): Promise<PlaywrightPage>;
  pages(): PlaywrightPage[];
  close(): Promise<void>;
  browser(): PlaywrightBrowser | null;
}

PlaywrightKeyboard

Source: sdk/src/drivers/playwright/types.ts
export interface PlaywrightKeyboard {
  down(key: string): Promise<void>;
  up(key: string): Promise<void>;
  press(key: string, options?: PlaywrightKeyboardOptions): Promise<void>;
  type(text: string, options?: PlaywrightKeyboardOptions): Promise<void>;
  insertText(text: string): Promise<void>;
}

PlaywrightLocator

Source: sdk/src/drivers/playwright/types.ts
export interface PlaywrightLocator {
  // Locator refinement methods (return new Locator)
  locator(selector: string, options?: PlaywrightLocatorOptions): PlaywrightLocator;
  filter(options: PlaywrightLocatorFilterOptions): PlaywrightLocator;
  first(): PlaywrightLocator;
  last(): PlaywrightLocator;
  nth(index: number): PlaywrightLocator;
  and(locator: PlaywrightLocator): PlaywrightLocator;
  or(locator: PlaywrightLocator): PlaywrightLocator;

  // Get by methods (return new Locator)
  getByRole(role: string, options?: PlaywrightGetByRoleOptions): PlaywrightLocator;
  getByText(text: string | RegExp, options?: PlaywrightGetByTextOptions): PlaywrightLocator;
  getByLabel(text: string | RegExp, options?: PlaywrightGetByLabelOptions): PlaywrightLocator;
  getByPlaceholder(
    text: string | RegExp,
    options?: PlaywrightGetByPlaceholderOptions
  ): PlaywrightLocator;
  getByAltText(text: string | RegExp, options?: PlaywrightGetByAltTextOptions): PlaywrightLocator;
  getByTitle(text: string | RegExp, options?: PlaywrightGetByTitleOptions): PlaywrightLocator;
  getByTestId(testId: string): PlaywrightLocator;

  // Action methods
  click(options?: PlaywrightClickOptions): Promise<void>;
  dblclick(options?: PlaywrightClickOptions): Promise<void>;
  fill(value: string, options?: PlaywrightFillOptions): Promise<void>;
  type(text: string, options?: PlaywrightTypeOptions): Promise<void>;
  press(key: string, options?: PlaywrightPressOptions): Promise<void>;
  check(options?: PlaywrightCheckOptions): Promise<void>;
  uncheck(options?: PlaywrightCheckOptions): Promise<void>;
  selectOption(
    values: string | string[] | { value?: string; label?: string; index?: number },
    options?: PlaywrightSelectOptionOptions
  ): Promise<string[]>;
  hover(options?: PlaywrightHoverOptions): Promise<void>;
  focus(options?: PlaywrightFocusOptions): Promise<void>;
  clear(options?: PlaywrightFillOptions): Promise<void>;

  // Query methods
  count(): Promise<number>;
  textContent(options?: PlaywrightTextContentOptions): Promise<string | null>;
  innerText(options?: PlaywrightInnerTextOptions): Promise<string>;
  innerHTML(options?: PlaywrightInnerHTMLOptions): Promise<string>;
  getAttribute(name: string, options?: PlaywrightGetAttributeOptions): Promise<string | null>;
  inputValue(options?: PlaywrightInputValueOptions): Promise<string>;
  isVisible(options?: PlaywrightIsOptions): Promise<boolean>;
  isHidden(options?: PlaywrightIsOptions): Promise<boolean>;
  isEnabled(options?: PlaywrightIsOptions): Promise<boolean>;
  isDisabled(options?: PlaywrightIsOptions): Promise<boolean>;
  isChecked(options?: PlaywrightIsOptions): Promise<boolean>;
  isEditable(options?: PlaywrightIsOptions): Promise<boolean>;

  // Wait methods
  waitFor(options?: PlaywrightWaitForOptions): Promise<void>;

  // Bounding box
  boundingBox(options?: { timeout?: number }): Promise<PlaywrightBoundingBoxResult | null>;

  // Screenshot
  screenshot(options?: PlaywrightScreenshotOptions): Promise<Buffer>;

  // Evaluate on element
  evaluate<R, Arg = unknown>(
    pageFunction: (element: Element, arg: Arg) => R | Promise<R>,
    arg?: Arg
  ): Promise<R>;

  // Evaluate on all matching elements
  evaluateAll<R, Arg = unknown>(
    pageFunction: (elements: Element[], arg: Arg) => R | Promise<R>,
    arg?: Arg
  ): Promise<R>;
}

PlaywrightLocatorFilterOptions

Source: sdk/src/drivers/playwright/types.ts
export interface PlaywrightLocatorFilterOptions {
  has?: PlaywrightLocator | SerializedLocatorChain;
  hasNot?: PlaywrightLocator | SerializedLocatorChain;
  hasText?: string | RegExp;
  hasNotText?: string | RegExp;
}

PlaywrightLocatorOptions

Source: sdk/src/drivers/playwright/types.ts
export interface PlaywrightLocatorOptions {
  has?: PlaywrightLocator | SerializedLocatorChain;
  hasNot?: PlaywrightLocator | SerializedLocatorChain;
  hasText?: string | RegExp;
  hasNotText?: string | RegExp;
}

PlaywrightMouse

Source: sdk/src/drivers/playwright/types.ts
export interface PlaywrightMouse {
  click(x: number, y: number, options?: PlaywrightMouseClickOptions): Promise<void>;
  dblclick(x: number, y: number, options?: PlaywrightMouseClickOptions): Promise<void>;
  down(options?: { button?: 'left' | 'right' | 'middle' }): Promise<void>;
  up(options?: { button?: 'left' | 'right' | 'middle' }): Promise<void>;
  move(x: number, y: number, options?: PlaywrightMouseMoveOptions): Promise<void>;
  wheel(deltaX: number, deltaY: number): Promise<void>;
}

PlaywrightPage

Source: sdk/src/drivers/playwright/types.ts
export interface PlaywrightPage {
  // Locator methods
  locator(selector: string, options?: PlaywrightLocatorOptions): PlaywrightLocator;
  getByRole(role: string, options?: PlaywrightGetByRoleOptions): PlaywrightLocator;
  getByText(text: string | RegExp, options?: PlaywrightGetByTextOptions): PlaywrightLocator;
  getByLabel(text: string | RegExp, options?: PlaywrightGetByLabelOptions): PlaywrightLocator;
  getByPlaceholder(
    text: string | RegExp,
    options?: PlaywrightGetByPlaceholderOptions
  ): PlaywrightLocator;
  getByAltText(text: string | RegExp, options?: PlaywrightGetByAltTextOptions): PlaywrightLocator;
  getByTitle(text: string | RegExp, options?: PlaywrightGetByTitleOptions): PlaywrightLocator;
  getByTestId(testId: string): PlaywrightLocator;

  // Navigation
  goto(url: string, options?: PlaywrightGotoOptions): Promise<void>;
  reload(options?: PlaywrightReloadOptions): Promise<void>;
  goBack(options?: PlaywrightGoBackOptions): Promise<void>;
  goForward(options?: PlaywrightGoForwardOptions): Promise<void>;

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

  // Mouse and Keyboard
  mouse: PlaywrightMouse;
  keyboard: PlaywrightKeyboard;

  // Page-level action shortcuts (convenience methods)
  click(selector: string, options?: PlaywrightClickOptions): Promise<void>;
  fill(selector: string, value: string, options?: PlaywrightFillOptions): Promise<void>;
  check(selector: string, options?: PlaywrightCheckOptions): Promise<void>;
  uncheck(selector: string, options?: PlaywrightCheckOptions): Promise<void>;
  isChecked(selector: string, options?: PlaywrightIsOptions): Promise<boolean>;
  selectOption(
    selector: string,
    values: string | string[] | { value?: string; label?: string; index?: number },
    options?: PlaywrightSelectOptionOptions
  ): Promise<string[]>;

  // Waiting
  waitForSelector(selector: string, options?: PlaywrightWaitForSelectorOptions): Promise<void>;
  waitForLoadState(
    state?: 'load' | 'domcontentloaded' | 'networkidle',
    options?: PlaywrightWaitForLoadStateOptions
  ): Promise<void>;
  waitForTimeout(timeout: number): Promise<void>;
  waitForURL(
    url: string | RegExp | ((url: URL) => boolean),
    options?: PlaywrightWaitForURLOptions
  ): Promise<void>;

  // Evaluation
  evaluate<R, Arg>(pageFunction: (arg: Arg) => R | Promise<R>, arg?: Arg): Promise<R>;
  evaluateHandle<R, Arg>(pageFunction: (arg: Arg) => R | Promise<R>, arg?: Arg): Promise<unknown>;

  // Screenshot & PDF
  screenshot(options?: PlaywrightPageScreenshotOptions): Promise<Buffer>;
  pdf(options?: PlaywrightPDFOptions): Promise<Buffer>;

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

  // Context
  context(): PlaywrightBrowserContext | null;

  // Viewport
  setViewportSize(viewportSize: { width: number; height: number }): Promise<void>;
  viewportSize(): { width: number; height: number } | null;

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

External Re-exports

ExportKindSourceNotes
LocatorChainSteptypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightBoundingBoxResulttypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightCheckOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightClickOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightFillOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightFocusOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGetAttributeOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGetByAltTextOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGetByLabelOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGetByPlaceholderOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGetByRoleOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGetByTextOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGetByTitleOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGoBackOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGoForwardOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightGotoOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightHoverOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightInnerHTMLOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightInnerTextOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightInputValueOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightIsOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightKeyboardOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightMouseClickOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightMouseMoveOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightNewContextOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightNewPageOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightPageScreenshotOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightPDFOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightPressOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightReloadOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightScreenshotOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightSelectOptionOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightTextContentOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightTypeOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightWaitForLoadStateOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightWaitForOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightWaitForSelectorOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source
PlaywrightWaitForURLOptionstypepackages/schemas/src/drivers/playwright/options.tsRe-exported from non-SDK source