Skip to content

Browser: Register sync and async JS APIs (k6-core side) #3778

Closed
@inancgumus

Description

@inancgumus

What

Expose two JS import paths for the browser module:

  • k6/browser -> The new async API
  • k6/experimental/browser -> The old sync API

Why

The browser team has been working on migrating the existing API to Async.

With v0.52.0's release date two weeks away, we're confident that the new Async API can be delivered in one shot. Since these changes are the last piece of the API design and we don't anticipate any breaking changes in the near future, it's worth discussing the graduation of the experimental Browser API to a stable module.

Here are a few reasons that brought us to this idea:

  • With the async API, we're aligned with Playwright, and we don't expect any further breaking changes to bridge this gap.
  • Releasing the new API may make future changes in the import path more challenging.
  • Releasing the async version of the API under a separate import path, k6/browser, while keeping k6/experimental/browser for a while during the deprecation window is a non-breaking change for existing user scripts.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions