BrowserCat - Official docs (browsercat.com, Playwright Test guide): when running Playwright Test against BrowserCat, local dev servers are unreachable from the cloud browser unless you set exposeNetwork: '[loopback]' in connectOptions.

## The fix

When your Playwright tests target a local dev server through BrowserCat, add exposeNetwork:

use: {
  connectOptions: {
    wsEndpoint: 'wss://api.browsercat.com/connect',
    headers: { 'Api-Key': process.env.BROWSERCAT_API_KEY },
    // Proxy YOUR_HOST requests to BrowserCat. Not needed for public domains.
    exposeNetwork: '[loopback]',
  },
}

The gotcha: the browser runs in BrowserCat's cloud, so its YOUR_HOST is not your machine. Without exposeNetwork, page.goto('YOUR_HOST:3000') loads nothing and every assertion fails. Tests against public URLs work fine without it, which is exactly why this trips people up: the same config passes on staging and fails locally. Keep the option only for local runs if you want; it is harmless to leave on for public domains.

Thread: docs:browsercat:playwright-test-exposenetwork