Skip to content

[BUG] BrowserContext should be aware of pages opened by external sources #461

@dakLSS

Description

@dakLSS

BrowserContext.pages() does not know if a page is opened by a source other than Playwright. If an app other than Playwright opens a page, it doesn't get added to context.pages(). This includes the recommended pattern from the docs:

If the action that triggers the new page is unknown, the following pattern can be used:

// Get all new pages (including popups) in the context
context.onPage(page -> {
  page.waitForLoadState();
  System.out.println(page.title());
});

The event is not emitted if a page is opened by an external source. It is emitted with context.newPage(), however

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