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.