Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# 🎭 Playwright

[![npm version](https://img.shields.io/npm/v/playwright.svg?style=flat)](https://www.npmjs.com/package/playwright) [![Join Slack](https://img.shields.io/badge/join-slack-infomational)](https://join.slack.com/t/playwright/shared_invite/enQtOTEyMTUxMzgxMjIwLThjMDUxZmIyNTRiMTJjNjIyMzdmZDA3MTQxZWUwZTFjZjQwNGYxZGM5MzRmNzZlMWI5ZWUyOTkzMjE5Njg1NDg) <!-- GEN:chromium-version-badge -->[![Chromium version](https://img.shields.io/badge/chromium-89.0.4328.0-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[![Firefox version](https://img.shields.io/badge/firefox-83.0b8-blue.svg?logo=mozilla-firefox)](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> [![WebKit version](https://img.shields.io/badge/webkit-14.0-blue.svg?logo=safari)](https://webkit.org/)
[![npm version](https://img.shields.io/npm/v/playwright.svg?style=flat)](https://www.npmjs.com/package/playwright) [![Join Slack](https://img.shields.io/badge/join-slack-infomational)](https://join.slack.com/t/playwright/shared_invite/enQtOTEyMTUxMzgxMjIwLThjMDUxZmIyNTRiMTJjNjIyMzdmZDA3MTQxZWUwZTFjZjQwNGYxZGM5MzRmNzZlMWI5ZWUyOTkzMjE5Njg1NDg) <!-- GEN:chromium-version-badge -->[![Chromium version](https://img.shields.io/badge/chromium-89.0.4330.0-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[![Firefox version](https://img.shields.io/badge/firefox-83.0b8-blue.svg?logo=mozilla-firefox)](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> [![WebKit version](https://img.shields.io/badge/webkit-14.0-blue.svg?logo=safari)](https://webkit.org/)

## [Documentation](https://playwright.dev) | [API reference](https://playwright.dev/#?path=docs/api.md)

Playwright is a Node.js library to automate [Chromium](https://www.chromium.org/Home), [Firefox](https://www.mozilla.org/en-US/firefox/new/) and [WebKit](https://webkit.org/) with a single API. Playwright is built to enable cross-browser web automation that is **ever-green**, **capable**, **reliable** and **fast**.

| | Linux | macOS | Windows |
| :--- | :---: | :---: | :---: |
| Chromium <!-- GEN:chromium-version -->89.0.4328.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Chromium <!-- GEN:chromium-version -->89.0.4330.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| WebKit 14.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Firefox <!-- GEN:firefox-version -->83.0b8<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |

Expand Down
2 changes: 1 addition & 1 deletion browsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"browsers": [
{
"name": "chromium",
"revision": "827767",
"revision": "828656",
"download": true
},
{
Expand Down
39 changes: 38 additions & 1 deletion src/server/chromium/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3753,6 +3753,10 @@ execution will stop on these operations as if there was a regular breakpoint set
* DOM breakpoint type.
*/
export type DOMBreakpointType = "subtree-modified"|"attribute-modified"|"node-removed";
/**
* CSP Violation type.
*/
export type CSPViolationType = "trustedtype-sink-violation"|"trustedtype-policy-violation";
/**
* Object event listener.
*/
Expand Down Expand Up @@ -3877,6 +3881,17 @@ entire subtree or provide an integer larger than 0.
}
export type removeXHRBreakpointReturnValue = {
}
/**
* Sets breakpoint on particular CSP violations.
*/
export type setBreakOnCSPViolationParameters = {
/**
* CSP Violations to stop upon.
*/
violationTypes: CSPViolationType[];
}
export type setBreakOnCSPViolationReturnValue = {
}
/**
* Sets breakpoint on particular operation with DOM.
*/
Expand Down Expand Up @@ -8623,6 +8638,16 @@ continueInterceptedRequest call.
*/
nodeId: DOM.NodeId;
}
export interface FlexNodeHighlightConfig {
/**
* A descriptor for the highlight appearance of flex containers.
*/
flexContainerHighlightConfig: FlexContainerHighlightConfig;
/**
* Identifier of the node to highlight.
*/
nodeId: DOM.NodeId;
}
/**
* Configuration for dual screen hinge
*/
Expand Down Expand Up @@ -8944,6 +8969,14 @@ Backend then generates 'inspectNodeRequested' event upon element selection.
}
export type setShowGridOverlaysReturnValue = {
}
export type setShowFlexOverlaysParameters = {
/**
* An array of node identifiers and descriptors for the highlight appearance.
*/
flexNodeHighlightConfigs: FlexNodeHighlightConfig[];
}
export type setShowFlexOverlaysReturnValue = {
}
/**
* Requests that backend shows paint rectangles
*/
Expand Down Expand Up @@ -13186,7 +13219,7 @@ variables as its properties.
/**
* Pause reason.
*/
reason: "ambiguous"|"assert"|"debugCommand"|"DOM"|"EventListener"|"exception"|"instrumentation"|"OOM"|"other"|"promiseRejection"|"XHR";
reason: "ambiguous"|"assert"|"CSPViolation"|"debugCommand"|"DOM"|"EventListener"|"exception"|"instrumentation"|"OOM"|"other"|"promiseRejection"|"XHR";
/**
* Object containing break-specific auxiliary properties.
*/
Expand Down Expand Up @@ -15780,6 +15813,7 @@ unsubscribes current runtime agent from Runtime.bindingCalled notifications.
"DOMDebugger.removeEventListenerBreakpoint": DOMDebugger.removeEventListenerBreakpointParameters;
"DOMDebugger.removeInstrumentationBreakpoint": DOMDebugger.removeInstrumentationBreakpointParameters;
"DOMDebugger.removeXHRBreakpoint": DOMDebugger.removeXHRBreakpointParameters;
"DOMDebugger.setBreakOnCSPViolation": DOMDebugger.setBreakOnCSPViolationParameters;
"DOMDebugger.setDOMBreakpoint": DOMDebugger.setDOMBreakpointParameters;
"DOMDebugger.setEventListenerBreakpoint": DOMDebugger.setEventListenerBreakpointParameters;
"DOMDebugger.setInstrumentationBreakpoint": DOMDebugger.setInstrumentationBreakpointParameters;
Expand Down Expand Up @@ -15924,6 +15958,7 @@ unsubscribes current runtime agent from Runtime.bindingCalled notifications.
"Overlay.setShowDebugBorders": Overlay.setShowDebugBordersParameters;
"Overlay.setShowFPSCounter": Overlay.setShowFPSCounterParameters;
"Overlay.setShowGridOverlays": Overlay.setShowGridOverlaysParameters;
"Overlay.setShowFlexOverlays": Overlay.setShowFlexOverlaysParameters;
"Overlay.setShowPaintRects": Overlay.setShowPaintRectsParameters;
"Overlay.setShowLayoutShiftRegions": Overlay.setShowLayoutShiftRegionsParameters;
"Overlay.setShowScrollBottleneckRects": Overlay.setShowScrollBottleneckRectsParameters;
Expand Down Expand Up @@ -16282,6 +16317,7 @@ unsubscribes current runtime agent from Runtime.bindingCalled notifications.
"DOMDebugger.removeEventListenerBreakpoint": DOMDebugger.removeEventListenerBreakpointReturnValue;
"DOMDebugger.removeInstrumentationBreakpoint": DOMDebugger.removeInstrumentationBreakpointReturnValue;
"DOMDebugger.removeXHRBreakpoint": DOMDebugger.removeXHRBreakpointReturnValue;
"DOMDebugger.setBreakOnCSPViolation": DOMDebugger.setBreakOnCSPViolationReturnValue;
"DOMDebugger.setDOMBreakpoint": DOMDebugger.setDOMBreakpointReturnValue;
"DOMDebugger.setEventListenerBreakpoint": DOMDebugger.setEventListenerBreakpointReturnValue;
"DOMDebugger.setInstrumentationBreakpoint": DOMDebugger.setInstrumentationBreakpointReturnValue;
Expand Down Expand Up @@ -16426,6 +16462,7 @@ unsubscribes current runtime agent from Runtime.bindingCalled notifications.
"Overlay.setShowDebugBorders": Overlay.setShowDebugBordersReturnValue;
"Overlay.setShowFPSCounter": Overlay.setShowFPSCounterReturnValue;
"Overlay.setShowGridOverlays": Overlay.setShowGridOverlaysReturnValue;
"Overlay.setShowFlexOverlays": Overlay.setShowFlexOverlaysReturnValue;
"Overlay.setShowPaintRects": Overlay.setShowPaintRectsReturnValue;
"Overlay.setShowLayoutShiftRegions": Overlay.setShowLayoutShiftRegionsReturnValue;
"Overlay.setShowScrollBottleneckRects": Overlay.setShowScrollBottleneckRectsReturnValue;
Expand Down
2 changes: 1 addition & 1 deletion test/frame-hierarchy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ it('should refuse to display x-frame-options:deny iframe', (test, { browserName
});
});
await page.setContent(`<iframe src="${server.CROSS_PROCESS_PREFIX}/x-frame-options-deny.html"></iframe>`);
expect(await refusalText).toMatch(/Refused to display 'http.*\/x-frame-options-deny\.html' in a frame because it set 'X-Frame-Options' to 'deny'./i);
expect(await refusalText).toMatch(/Refused to display .* in a frame because it set 'X-Frame-Options' to 'deny'./i);
});

it('should return frame.page()', async ({page, server}) => {
Expand Down