When browser receives multiple header values for the same header name,
we present them as LF-separated value. This is not considered valid in
Node, so we should split by LF when serving a snapshot.
There more invalid characters in headers, so just in case we try/catch it.
- Simplify by only considering client/ vs non-client/
- Fix stack traces when calling from other playwright code, e.g. from the cli
- Account for re-entrant calls that happen when
instrumenting context creation/desctruction
- Add tests
- Fix StackTraceView on Windows
When sharing a context between tests and using `'on-first-retry'` we
could end up with tracing still running in non-retried tests. That's
extra overhead without a reason.
Without this, Playwright's CDP feature leaves unreachable
targets (namely OOPIFs).
This change allows for more advanced experimentation in user-land
without relying on out-of-band CDP connections and clients.
Now you can, for example, call `DOM.getDocument` on the
page OR main frame, observe there is an iframe node with
no `contentDocument` (i.e. OOPIF), make note of the referenced
`frameId`, and then iterate of page.frames() calling `Target.getInfo`
on each to link the Playwright Frame with the CDP `frameId` and
then recurse.
Relates #8113
Using a worker fixture forces a new worker. This might be unexpected
when part of the test file runs in one worker, and another runs
in another worker. Top-level use of worker fixtures is still fine.
- Uses some auto fixtures to set default options and instrumentation on BrowserType.
- Moves screenshot, trace and video to worker-scoped fixtures.
- Throws in page/context when used from beforeAll/afterAll.
- Plumbs around BrowserType to be accessible from Browser and BrowserContext.
Each hook gets its own test scope. This is not too useful for
object fixtures like `page` (although one can use a page in
`beforeAll` to save storage state), but much more useful for option
fixtures like `viewport`.
This patch adds support for the `vue` selector engine that allows
selecting DOM elements based on the component name.
> **NOTE**: `vue` engine supports Vue2 and Vue2.
References #7189
This patch adds support for the `react` selector engine that allows
selecting DOM elements based on the component name.
> **NOTE**: in case of multi-root components (React.Fragment), `react`
engine will select all root DOM elements.
> **NOTE**: `react` engine supports react v15+.
References #7189