OptionalcomponentOptionalconnectOptionalconnectDisambiguate the connect method. A raw CDP websocket also uses ws://, which
auto-detect would treat as a Playwright server; set 'cdp' to force CDP.
Defaults to 'auto' (scheme-based detection).
OptionaldebugOptionaldeviceOptionalheadlessOptionallocaleOptionalreuseWhen attached, reuse the running browser's existing default context so its
cookies / auth / session are shared (the point of attaching to YOUR browser),
instead of creating a fresh isolated context. Defaults to false. Falls back to
the MJ_REACT_TEST_HARNESS_REUSE_CONTEXT env var (1/true/yes).
Note: this breaks per-test isolation — parallel harness instances would share one context. Viewport/locale/userAgent options are ignored when reusing a context (they only apply to contexts the harness creates).
OptionalscreenshotOptionalscreenshotOptionaltimezoneOptionaluserOptionalviewport
Attach to an already-running browser instead of launching a new one. The connect method is auto-detected from the endpoint scheme:
http(s)://…→ Chrome DevTools Protocol (chromium.connectOverCDP), e.g. a real Chrome started with--remote-debugging-port=9222.ws(s)://…→ a Playwright browser server (chromium.connect), e.g. one started viachromium.launchServer()(local pool / Docker / remote). Falls back to theMJ_REACT_TEST_HARNESS_CONNECTenv var when unset. When attaching,headlessis ignored — the external browser already decided.