Skip to content

Define on a shared user facing API for BiDi and CDP #8168

@diemol

Description

@diemol

🚀 Feature Proposal

We'd like to define a shared user-facing API that users can interact with when using bi-directional WebDriver API. Until the standard is delivered, this API is likely to be backed by CDP.

Motivation

See https://github.com/w3c/webdriver-bidi/blob/master/proposals/core.md for more details. The API should focus on satisfying the following use cases:

Event-based use cases:

  • Listen for DOM events
  • Log what's going on in the browser including console and JS errors
  • Fail fast on any JS error
  • Intercept network requests allowing to mock backend requests
  • Record traffic (Alex: Allow replaying it?)
  • Authenticate on secure pages
  • Bootstrap scripts (for example, execute JavaScript snippet on every page load)
  • Listen for new contexts (Alex: Not sure what do we mean by contexts?)

Other use cases:

  • Take full-page screenshots
  • Access throttling and performance timings
  • Dynamic changes to iframe or documents (Alex: Not sure it means to make changes or listen for changes?)

Example

Read the issue comments for examples.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions