Skip to content

Feature Request: Add offline mode support to browser context #696

@noda-uv

Description

@noda-uv

Description

Currently, Playwright MCP does not support simulating offline conditions, which is available in native Playwright through browserContext.setOffline().

Suggested Solution

Add a built-in tool (e.g., browser_set_offline) that:

  • Toggles offline mode for the current browser context
  • Accepts a boolean parameter to enable/disable offline state
  • Maps directly to Playwright's browserContext.setOffline(offline) API

This would enable testing of offline functionality without manual workarounds.

Use Case

I need to test how my application behaves when the network connection is lost. Being able to toggle offline mode is essential to verify error handling and ensure the application responds appropriately when offline.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions