Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

GoogleChromeLabs/webdriver-bidi-protocol

Open more actions menu

webdriver-bidi-protocol

This repository contains TypeScript types conforming to the WebDriver BiDi specification. It also supports WebDriver BiDi extension modules defined in other specifications:

Installation

npm install webdriver-bidi-protocol

Usage

In your TypeScript client implementation, you can now import WebDriver BiDi types:

import {Commands} from 'webdriver-bidi-protocol';

async function sendCommand<T extends keyof Commands>(
  method: T,
  params: Commands[T]['params']
): {result: Commands[T]['returnType']} {
  // Implementation for sending the data using WebSockets.
}

// Now TypeScript validates that the params match the spec for 'browsingContext.print'.
await sendCommand('browsingContext.print', {context: 'xxx'});

Versioning

This package patch version will be incremented whenever there are specification updates.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Morty Proxy This is a proxified and sanitized view of the page, visit original site.