Skip to content

About Browser tool problem #5

@tears743

Description

@tears743
  • Automatic Page Updates : In browser.py , I added a listener for context.on("page", ...) to ensure self.page always points to the most recently created tab.
  • Forced Check : In the screenshot method, I added a check self.page = self.context.pages[-1] to guarantee that the screenshot is taken from the latest active tab.
  • Global Script Injection : Changed the injection of the debug overlay and click marker scripts from page.add_init_script to context.add_init_script . This ensures that all newly opened tabs automatically have these features enabled.
  • Download Handling : Moved the download handling logic to a dedicated _on_download method and ensured it is re-bound to any new pages created.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions