Skip to content

[Feature]: Adding test recording for web extension #36758

@mhabsaoui

Description

@mhabsaoui

🚀 Feature Request

To be able to launch a Playwright Test Record with a web extension's Options page URL (like chrome-extension://efloofkjifapnmlhlahjefjhibkpecdh/options.html) in the browser and start playing usage scenarios.

Example

For instance we start a test recording for a web extension project from IDE (VSCode Playwright Testing plugin).

In the opened browser window we should be able to go to the web extension URL (set in fixtures.ts) and start playing the E2E tests scenarios.

import { BrowserContext, Page } from "@playwright/test";

export async function openOptions(
  context: BrowserContext,
  page: Page,
  extensionId: string
) {
  await page.goto(`chrome-extension://${extensionId}/options.html`);
  return page;
}

But web add-ons special URLs are blocked (by Browser security / Playwright context ?) :

Image

Motivation

It Would be very useful to be able to also test record pages from Web Extension, like we already do for web pages 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions