Zum Hauptinhalt springen

WebDriver Bidi Protocol

These protocol commands are generated based on the current living WebDriver Bidi specification.

Use with Caution!

Browser support is not guaranteed and interfaces can change in the future. The standard is currently under development and browser vendors will add these capabilities based on their own timelines.

Last Updated: Tue Sep 19 2023 17:28:42 GMT+0000 (Coordinated Universal Time)


send‚Äč

Send socket commands via WebDriver Bidi

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.send(params)
Parameters‚Äč
NameTypeDetails
paramsCommandDatasocket payload
Returns‚Äč
  • <Object> CommandResponse: WebDriver Bidi response

sendAsync‚Äč

Send asynchronous socket commands via WebDriver Bidi

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.sendAsync(params)
Parameters‚Äč
NameTypeDetails
paramsCommandDatasocket payload
Returns‚Äč
  • <Number> id: id of WebDriver Bidi request

sessionStatus‚Äč

WebDriver Bidi command to send command method "session.status" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.sessionStatus(params)
Parameters‚Äč
NameTypeDetails
paramsremote.EmptyParams
{}
Returns‚Äč
  • <Object> local.SessionStatusResult: Command return value with the following interface:
    {
    ready: boolean;
    message: string;
    }

sessionNew‚Äč

WebDriver Bidi command to send command method "session.new" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.sessionNew(params)
Parameters‚Äč
NameTypeDetails
paramsremote.SessionNewParameters
{
capabilities: SessionCapabilitiesRequest;
}
Returns‚Äč
  • <Object> local.SessionNewResult: Command return value with the following interface:
    {
    sessionId: string;
    capabilities: {
    acceptInsecureCerts: boolean;
    browserName: string;
    browserVersion: string;
    platformName: string;
    proxy: {
    proxyType?: "pac" | "direct" | "autodetect" | "system" | "manual";
    proxyAutoconfigUrl?: string;
    ftpProxy?: string;
    httpProxy?: string;
    noProxy?: string[];
    sslProxy?: string;
    socksProxy?: string;
    socksVersion?: number;
    };
    setWindowRect: boolean;
    };
    }

sessionEnd‚Äč

WebDriver Bidi command to send command method "session.end" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.sessionEnd(params)
Parameters‚Äč
NameTypeDetails
paramsremote.EmptyParams
{}

sessionSubscribe‚Äč

WebDriver Bidi command to send command method "session.subscribe" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.sessionSubscribe(params)
Parameters‚Äč
NameTypeDetails
paramsremote.SessionSubscriptionRequest
{
events: string[];
contexts?: BrowsingContextBrowsingContext[];
}

sessionUnsubscribe‚Äč

WebDriver Bidi command to send command method "session.unsubscribe" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.sessionUnsubscribe(params)
Parameters‚Äč
NameTypeDetails
paramsremote.SessionSubscriptionRequest
{
events: string[];
contexts?: BrowsingContextBrowsingContext[];
}

browserClose‚Äč

WebDriver Bidi command to send command method "browser.close" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.browserClose(params)
Parameters‚Äč
NameTypeDetails
paramsremote.EmptyParams
{}

browsingContextCaptureScreenshot‚Äč

WebDriver Bidi command to send command method "browsingContext.captureScreenshot" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.browsingContextCaptureScreenshot(params)
Parameters‚Äč
NameTypeDetails
paramsremote.BrowsingContextCaptureScreenshotParameters
{
context: BrowsingContextBrowsingContext;
}
Returns‚Äč
  • <Object> local.BrowsingContextCaptureScreenshotResult: Command return value with the following interface:
    {
    data: string;
    }

browsingContextClose‚Äč

WebDriver Bidi command to send command method "browsingContext.close" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.browsingContextClose(params)
Parameters‚Äč
NameTypeDetails
paramsremote.BrowsingContextCloseParameters
{
context: BrowsingContextBrowsingContext;
}

browsingContextCreate‚Äč

WebDriver Bidi command to send command method "browsingContext.create" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.browsingContextCreate(params)
Parameters‚Äč
NameTypeDetails
paramsremote.BrowsingContextCreateParameters
{
type: BrowsingContextCreateType;
referenceContext?: BrowsingContextBrowsingContext;
}
Returns‚Äč
  • <Object> local.BrowsingContextCreateResult: Command return value with the following interface:
    {
    context: BrowsingContextBrowsingContext;
    }

browsingContextGetTree‚Äč

WebDriver Bidi command to send command method "browsingContext.getTree" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.browsingContextGetTree(params)
Parameters‚Äč
NameTypeDetails
paramsremote.BrowsingContextGetTreeParameters
{
maxDepth?: JsUint;
root?: BrowsingContextBrowsingContext;
}
Returns‚Äč
  • <Object> local.BrowsingContextGetTreeResult: Command return value with the following interface:
    {
    contexts: BrowsingContextInfoList;
    }

browsingContextHandleUserPrompt‚Äč

WebDriver Bidi command to send command method "browsingContext.handleUserPrompt" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.browsingContextHandleUserPrompt(params)
Parameters‚Äč
NameTypeDetails
paramsremote.BrowsingContextHandleUserPromptParameters
{
context: BrowsingContextBrowsingContext;
accept?: boolean;
userText?: string;
}

browsingContextNavigate‚Äč

WebDriver Bidi command to send command method "browsingContext.navigate" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.browsingContextNavigate(params)
Parameters‚Äč
NameTypeDetails
paramsremote.BrowsingContextNavigateParameters
{
context: BrowsingContextBrowsingContext;
url: string;
wait?: BrowsingContextReadinessState;
}
Returns‚Äč
  • <Object> local.BrowsingContextNavigateResult: Command return value with the following interface:
    {
    navigation: BrowsingContextNavigation | null;
    url: string;
    }

browsingContextPrint‚Äč

WebDriver Bidi command to send command method "browsingContext.print" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.browsingContextPrint(params)
Parameters‚Äč
NameTypeDetails
paramsremote.BrowsingContextPrintParameters
{
context: BrowsingContextBrowsingContext;
background?: boolean;
margin?: BrowsingContextPrintMarginParameters;
/**
* @default 'portrait'
*/
orientation?: "portrait" | "landscape";
page?: BrowsingContextPrintPageParameters;
pageRanges?: (JsUint | string)[];
/**
* @default 1
*/
scale?: number;
/**
* @default true
*/
shrinkToFit?: boolean;
}
Returns‚Äč
  • <Object> local.BrowsingContextPrintResult: Command return value with the following interface:
    {
    data: string;
    }

browsingContextReload‚Äč

WebDriver Bidi command to send command method "browsingContext.reload" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.browsingContextReload(params)
Parameters‚Äč
NameTypeDetails
paramsremote.BrowsingContextReloadParameters
{
context: BrowsingContextBrowsingContext;
ignoreCache?: boolean;
wait?: BrowsingContextReadinessState;
}

scriptAddPreloadScriptCommand‚Äč

WebDriver Bidi command to send command method "script.addPreloadScript" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.scriptAddPreloadScriptCommand(params)
Parameters‚Äč
NameTypeDetails
paramsremote.ScriptAddPreloadScriptParameters
{
functionDeclaration: string;
arguments?: ScriptChannelValue[];
sandbox?: string;
}

scriptDisown‚Äč

WebDriver Bidi command to send command method "script.disown" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.scriptDisown(params)
Parameters‚Äč
NameTypeDetails
paramsremote.ScriptDisownParameters
{
handles: ScriptHandle[];
target: ScriptTarget;
}

scriptCallFunction‚Äč

WebDriver Bidi command to send command method "script.callFunction" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.scriptCallFunction(params)
Parameters‚Äč
NameTypeDetails
paramsremote.ScriptCallFunctionParameters
{
functionDeclaration: string;
awaitPromise: boolean;
target: ScriptTarget;
arguments?: ScriptArgumentValue[];
resultOwnership?: ScriptResultOwnership;
serializationOptions?: ScriptSerializationOptions;
this?: ScriptArgumentValue;
}

scriptEvaluate‚Äč

WebDriver Bidi command to send command method "script.evaluate" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.scriptEvaluate(params)
Parameters‚Äč
NameTypeDetails
paramsremote.ScriptEvaluateParameters
{
expression: string;
target: ScriptTarget;
awaitPromise: boolean;
resultOwnership?: ScriptResultOwnership;
serializationOptions?: ScriptSerializationOptions;
}
Returns‚Äč
  • <Object> local.ScriptEvaluateResult: Command return value with the following interface:
    ;

scriptGetRealms‚Äč

WebDriver Bidi command to send command method "script.getRealms" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.scriptGetRealms(params)
Parameters‚Äč
NameTypeDetails
paramsremote.ScriptGetRealmsParameters
{
context?: BrowsingContextBrowsingContext;
type?: ScriptRealmType;
}
Returns‚Äč
  • <Object> local.ScriptGetRealmsResult: Command return value with the following interface:
    {
    realms: ScriptRealmInfo[];
    }

scriptRemovePreloadScriptCommand‚Äč

WebDriver Bidi command to send command method "script.removePreloadScript" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.scriptRemovePreloadScriptCommand(params)
Parameters‚Äč
NameTypeDetails
paramsremote.ScriptRemovePreloadScriptParameters
{
script: ScriptPreloadScript;
}

inputPerformActions‚Äč

WebDriver Bidi command to send command method "input.performActions" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.inputPerformActions(params)
Parameters‚Äč
NameTypeDetails
paramsremote.InputPerformActionsParameters
{
context: BrowsingContextBrowsingContext;
actions: InputSourceActions[];
}

inputReleaseActions‚Äč

WebDriver Bidi command to send command method "input.releaseActions" with parameters.

WebDriver Bidi Protocol command. More details can be found in the official protocol docs.

Usage‚Äč
browser.inputReleaseActions(params)
Parameters‚Äč
NameTypeDetails
paramsremote.InputReleaseActionsParameters
{
context: BrowsingContextBrowsingContext;
}

Welcome! How can I help?

WebdriverIO AI Copilot