PageSourceSearch

https://playwright.dev/assets/js/2697cf9f.63d5e72a.js

js playwright.dev collected 2026-09-24 06:54:16 UTC 329,246 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkplaywright_dev=self.webpackChunkplaywright_dev||[]).push([["2074"],{85627(e,s,n){n.r(s),n.d(s,{metadata:()=>r,default:()=>p,frontMatter:()=>a,contentTitle:()=>l,toc:()=>d,assets:()=>c});var r=JSON.parse('{"id":"release-notes","title":"Release notes","description":"Version 1.63","source":"@site/versioned_docs/version-stable/release-notes.mdx","sourceDirName":".","slug":"/release-notes","permalink":"/docs/release-notes","draft":false,"unlisted":false,"tags":[],"version":"stable","frontMatter":{"id":"release-notes","title":"Release notes","toc_max_heading_level":2},"sidebar":"docs","previous":{"title":"VS Code","permalink":"/docs/getting-started-vscode"},"next":{"title":"Canary releases","permalink":"/docs/canary-releases"}}'),i=n(74848),t=n(28453);n(13554),n(41647),n(83137);var o=n(21588);let a={id:"release-notes",title:"Release notes",toc_max_heading_level:2},l,c={},d=[{value:"Version 1.63",id:"version-163",level:2},{value:"\u{1F512} Test locks",id:"-test-locks",level:3},{value:"\u{1FA9F} Locate across frames",id:"-locate-across-frames",level:3},{value:"\u{1F441}\uFE0F Visible-only locators",id:"\uFE0F-visible-only-locators",level:3},{value:"\u{1F9FE} Step params and subtitles",id:"-step-params-and-subtitles",level:3},{value:"\u{1F5BC}\uFE0F Aria and screen snapshots in traces",id:"\uFE0F-aria-and-screen-snapshots-in-traces",level:3},{value:"New APIs",id:"new-apis",level:3},{value:"Browser and Context",id:"browser-and-context",level:4},{value:"Locators",id:"locators",level:4},{value:"Test runner",id:"test-runner",level:4},{value:"Command line",id:"command-line",level:4},{value:"Miscellaneous",id:"miscellaneous",level:4},{value:"Announcements",id:"announcements",level:3},{value:"Browser Versions",id:"browser-versions",level:3},{value:"Version 1.62",id:"version-162",level:2},{value:"\u{1F9F1} New component testing model",id:"-new-component-testing-model",level:3},{value:"\u{1F6D1} Cancel operations with AbortSignal",id:"-cancel-operations-with-abortsignal",level:3},{value:"\u{1F5BC}\uFE0F WebP screenshots",id:"\uFE0F-webp-screenshots",level:3},{value:"\u{1F9E9} Custom test filtering with Reporter.preprocess()",id:"-custom-test-filtering-with-reporterpreprocess",level:3},{value:"\u{1F501} Isolated retries",id:"-isolated-retries",level:3},{value:"New APIs",id:"new-apis-1",level:3},{value:"Browser and Context",id:"browser-and-context-1",level:4},{value:"Actions",id:"actions",level:4},{value:"Network",id:"network",level:4},{value:"Evaluation",id:"evaluation",level:4},{value:"Command line & MCP",id:"command-line--mcp",level:4},{value:"Reporters",id:"reporters",level:4},{value:"Announcements",id:"announcements-1",level:3},{value:"Browser Versions",id:"browser-versions-1",level:3},{value:"Version 1.61",id:"version-161",level:2},{value:"\u{1F511} WebAuthn passkeys",id:"-webauthn-passkeys",level:3},{value:"\u{1F5C3}\uFE0F Web Storage",id:"\uFE0F-web-storage",level:3},{value:"New APIs",id:"new-apis-2",level:3},{value:"Network",id:"network-1",level:4},{value:"Browser and Screencast",id:"browser-and-screencast",level:4},{value:"Test runner",id:"test-runner-1",level:4},{value:"\u{1F6E0}\uFE0F Other improvements",id:"\uFE0F-other-improvements",level:3},{value:"Browser Versions",id:"browser-versions-2",level:3},{value:"Version 1.60",id:"version-160",level:2},{value:"\u{1F310} HAR recording on Tracing",id:"-har-recording-on-tracing",level:3},{value:"\u{1FA9D} Drop API",id:"-drop-api",level:3},{value:"\u{1F3AF} Aria snapshots",id:"-aria-snapshots",level:3},{value:"\u{1F6D1} test.abort()",id:"-testabort",level:3},{value:"New APIs",id:"new-apis-3",level:3},{value:"Browser, Context and Page",id:"browser-context-and-page",level:4},{value:"Locators and Assertions",id:"locators-and-assertions",level:4},{value:"Network",id:"network-2",level:4},{value:"Errors and Reporting",id:"errors-and-reporting",level:4},{value:"Test runner",id:"test-runner-2",level:4},{value:"\u{1F6E0}\uFE0F Other improvements",id:"\uFE0F-other-improvements-1",level:3},{value:"Breaking Changes \u26A0\uFE0F",id:"breaking-changes-\uFE0F",level:3},{value:"Browser Versions",id:"browser-versions-3",level:3},{value:"Version 1.59",id:"version-159",level:2},{value:"\u{1F3AC} Screencast",id:"-screencast",level:3},{value:"\u{1F517} Interoperability",id:"-interoperability",level:3},{value:"\u{1F4CA} Observability",id:"-observability",level:3},{value:"\u{1F41B} CLI debugger for agents",id:"-cli-debugger-for-agents",level:3},{value:"\u{1F4CB} CLI trace analysis for agents",id:"-cli-trace-analysis-for-agents",level:3}
1,{value:"\u267B\uFE0F <code>await using</code>",id:"\uFE0F-await-using",level:3},{value:"\u{1F50D} Snapshots and Locators",id:"-snapshots-and-locators",level:3},{value:"New APIs",id:"new-apis-4",level:3},{value:"Screencast",id:"screencast",level:4},{value:"Storage, Console and Errors",id:"storage-console-and-errors",level:4},{value:"Miscellaneous",id:"miscellaneous-1",level:4},{value:"\u{1F6E0}\uFE0F Other improvements",id:"\uFE0F-other-improvements-2",level:3},{value:"Breaking Changes \u26A0\uFE0F",id:"breaking-changes-\uFE0F-1",level:3},{value:"Browser Versions",id:"browser-versions-4",level:3},{value:"Version 1.58",id:"version-158",level:2},{value:"Timeline",id:"timeline",level:3},{value:"UI Mode and Trace Viewer Improvements",id:"ui-mode-and-trace-viewer-improvements",level:3},{value:"Miscellaneous",id:"miscellaneous-2",level:3},{value:"Breaking Changes \u26A0\uFE0F",id:"breaking-changes-\uFE0F-2",level:3},{value:"Browser Versions",id:"browser-versions-5",level:3},{value:"Version 1.57",id:"version-157",level:2},{value:"Speedboard",id:"speedboard",level:3},{value:"Chrome for Testing",id:"chrome-for-testing",level:3},{value:"Waiting for webserver output",id:"waiting-for-webserver-output",level:3},{value:"Breaking Change",id:"breaking-change",level:3},{value:"New APIs",id:"new-apis-5",level:3},{value:"Miscellaneous",id:"miscellaneous-3",level:3},{value:"Browser Versions",id:"browser-versions-6",level:3},{value:"Version 1.56",id:"version-156",level:2},{value:"Playwright Test Agents",id:"playwright-test-agents",level:3},{value:"New APIs",id:"new-apis-6",level:3},{value:"UI Mode and HTML Reporter",id:"ui-mode-and-html-reporter",level:3},{value:"Breaking Changes",id:"breaking-changes",level:3},{value:"Miscellaneous",id:"miscellaneous-4",level:3},{value:"Browser Versions",id:"browser-versions-7",level:3},{value:"Version 1.55",id:"version-155",level:2},{value:"New APIs",id:"new-apis-7",level:3},{value:"Codegen",id:"codegen",level:3},{value:"Breaking Changes",id:"breaking-changes-1",level:3},{value:"Miscellaneous",id:"miscellaneous-5",level:3},{value:"Browser Versions",id:"browser-versions-8",level:3},{value:"Version 1.54",id:"version-154",level:2},{value:"Highlights",id:"highlights",level:3},{value:"Command Line",id:"command-line-1",level:3},{value:"Miscellaneous",id:"miscellaneous-6",level:3},{value:"Browser Versions",id:"browser-versions-9",level:3},{value:"Version 1.53",id:"version-153",level:2},{value:"Trace Viewer and HTML Reporter Updates",id:"trace-viewer-and-html-reporter-updates",level:3},{value:"Miscellaneous",id:"miscellaneous-7",level:3},{value:"Browser Versions",id:"browser-versions-10",level:3},{value:"Version 1.52",id:"version-152",level:2},{value:"Highlights",id:"highlights-1",level:3},{value:"Test Runner",id:"test-runner-3",level:3},{value:"Miscellaneous",id:"miscellaneous-8",level:3},{value:"Breaking Changes",id:"breaking-changes-2",level:3},{value:"Browser Versions",id:"browser-versions-11",level:3},{value:"Version 1.51",id:"version-151",level:2},{value:"StorageState for indexedDB",id:"storagestate-for-indexeddb",level:3},{value:"Copy as prompt",id:"copy-as-prompt",level:3},{value:"Filter visible elements",id:"filter-visible-elements",level:3},{value:"Git information in HTML report",id:"git-information-in-html-report",level:3},{value:"Test Step improvements",id:"test-step-improvements",level:3},{value:"Miscellaneous",id:"miscellaneous-9",level:3},{value:"Browser Versions",id:"browser-versions-12",level:3},{value:"Version 1.50",id:"version-150",level:2},{value:"Test runner",id:"test-runner-4",level:3},{value:"UI updates",id:"ui-updates",level:3},{value:"Breaking",id:"breaking",level:3},{value:"Browser Versions",id:"browser-versions-13",level:3},{value:"Version 1.49",id:"version-149",level:2},{value:"Aria snapshots",id:"aria-snapshots",level:3},{value:"Test runner",id:"test-runner-5",level:3},{value:"Breaking: <code>chrome</code> and <code>msedge</code> channels switch to new headless mode",id:"breaking-chrome-and-msedge-channels-switch-to-new-headless-mode",level:3},{value:"What do I need to do?",id:"what-do-i-need-to-do",level:4},{value:"Other breaking changes",id:"other-breaking-changes",level:3}
1,{value:"Try new Chromium headless",id:"try-new-chromium-headless",level:3},{value:"Miscellaneous",id:"miscellaneous-10",level:3},{value:"Browser Versions",id:"browser-versions-14",level:3},{value:"Version 1.48",id:"version-148",level:2},{value:"WebSocket routing",id:"websocket-routing",level:3},{value:"UI updates",id:"ui-updates-1",level:3},{value:"Miscellaneous",id:"miscellaneous-11",level:3},{value:"Browser Versions",id:"browser-versions-15",level:3},{value:"Version 1.47",id:"version-147",level:2},{value:"Network Tab improvements",id:"network-tab-improvements",level:3},{value:"<code>--tsconfig</code> CLI option",id:"--tsconfig-cli-option",level:3},{value:"APIRequestContext now accepts <code>URLSearchParams</code> and <code>string</code> as query parameters",id:"apirequestcontext-now-accepts-urlsearchparams-and-string-as-query-parameters",level:3},{value:"Miscellaneous",id:"miscellaneous-12",level:3},{value:"Browser Versions",id:"browser-versions-16",level:3},{value:"Version 1.46",id:"version-146",level:2},{value:"TLS Client Certificates",id:"tls-client-certificates",level:3},{value:"<code>--only-changed</code> cli option",id:"--only-changed-cli-option",level:3},{value:"Component Testing: New <code>router</code> fixture",id:"component-testing-new-router-fixture",level:3},{value:"UI Mode / Trace Viewer Updates",id:"ui-mode--trace-viewer-updates",level:3},{value:"Miscellaneous",id:"miscellaneous-13",level:3},{value:"Browser Versions",id:"browser-versions-17",level:3},{value:"Version 1.45",id:"version-145",level:2},{value:"Clock",id:"clock",level:3},{value:"Test runner",id:"test-runner-6",level:3},{value:"Miscellaneous",id:"miscellaneous-14",level:3},{value:"Browser Versions",id:"browser-versions-18",level:3},{value:"Version 1.44",id:"version-144",level:2},{value:"New APIs",id:"new-apis-8",level:3},{value:"Browser Versions",id:"browser-versions-19",level:3},{value:"Version 1.43",id:"version-143",level:2},{value:"New APIs",id:"new-apis-9",level:3},{value:"UI Mode Updates",id:"ui-mode-updates",level:3},{value:"Browser Versions",id:"browser-versions-20",level:3},{value:"Version 1.42",id:"version-142",level:2},{value:"New APIs",id:"new-apis-10",level:3},{value:"Announcements",id:"announcements-2",level:3},{value:"Browser Versions",id:"browser-versions-21",level:3},{value:"Version 1.41",id:"version-141",level:2},{value:"New APIs",id:"new-apis-11",level:3},{value:"Browser Versions",id:"browser-versions-22",level:3},{value:"Version 1.40",id:"version-140",level:2},{value:"Test Generator Update",id:"test-generator-update",level:3},{value:"New APIs",id:"new-apis-12",level:3},{value:"Other Changes",id:"other-changes",level:3},{value:"Browser Versions",id:"browser-versions-23",level:3},{value:"Version 1.39",id:"version-139",level:2},{value:"Add custom matchers to your expect",id:"add-custom-matchers-to-your-expect",level:3},{value:"Merge test fixtures",id:"merge-test-fixtures",level:3},{value:"Merge custom expect matchers",id:"merge-custom-expect-matchers",level:3},{value:"Hide implementation details: box test steps",id:"hide-implementation-details-box-test-steps",level:3},{value:"New APIs",id:"new-apis-13",level:3},{value:"Browser Versions",id:"browser-versions-24",level:3},{value:"Version 1.38",id:"version-138",level:2},{value:"UI Mode Updates",id:"ui-mode-updates-1",level:3},{value:"New APIs",id:"new-apis-14",level:3},{value:"Deprecations",id:"deprecations",level:3},{value:"Breaking Changes: Playwright no longer downloads browsers automatically",id:"breaking-changes-playwright-no-longer-downloads-browsers-automatically",level:3},{value:"Browser Versions",id:"browser-versions-25",level:3},{value:"Version 1.37",id:"version-137",level:2},{value:"New <code>npx playwright merge-reports</code> tool",id:"new-npx-playwright-merge-reports-tool",level:3},{value:"\u{1F4DA} Debian 12 Bookworm Support",id:"-debian-12-bookworm-support",level:3},{value:"UI Mode Updates",id:"ui-mode-updates-2",level:3},{value:"Browser Versions",id:"browser-versions-26",level:3},{value:"Version 1.36",id:"version-136",level:2},{value:"Browser Versions",id:"browser-versions-27",level:3},{value:"Version 1.35",id:"version-135",level:2},{value:"Highlights",id:"highlights-2",level:3},{value:"\u26A0\uFE0F Breaking changes",id:"\uFE0F-breaking-changes",level:3},{value:"Browser Versions",id:"browser-versions-28",level:3},{value:"Version 1.34",id:"version-134",level:2},{value:"Highlights",id:"highlights-3",level:3},{value:"\u26A0\uFE0F Breaking changes",id:"\uFE0F-breaking-changes-1",level:3},{value:"Browser Versions",id:"browser-versions-29",level:3},{value:"Version 1.33",id:"version-133",level:2},{value:"Locators Update",id:"locators-update",level:3}
1,{value:"New APIs",id:"new-apis-15",level:3},{value:"\u26A0\uFE0F Breaking change",id:"\uFE0F-breaking-change",level:3},{value:"Browser Versions",id:"browser-versions-30",level:3},{value:"Version 1.32",id:"version-132",level:2},{value:"Introducing UI Mode (preview)",id:"introducing-ui-mode-preview",level:3},{value:"New APIs",id:"new-apis-16",level:3},{value:"\u26A0\uFE0F Breaking change in component tests",id:"\uFE0F-breaking-change-in-component-tests",level:3},{value:"Browser Versions",id:"browser-versions-31",level:3},{value:"Version 1.31",id:"version-131",level:2},{value:"New APIs",id:"new-apis-17",level:3},{value:"Miscellaneous",id:"miscellaneous-15",level:3},{value:"\u26A0\uFE0F Breaking change in component tests",id:"\uFE0F-breaking-change-in-component-tests-1",level:3},{value:"Browser Versions",id:"browser-versions-32",level:3},{value:"Version 1.30",id:"version-130",level:2},{value:"Browser Versions",id:"browser-versions-33",level:3},{value:"Version 1.29",id:"version-129",level:2},{value:"New APIs",id:"new-apis-18",level:3},{value:"Miscellaneous",id:"miscellaneous-16",level:3},{value:"Browser Versions",id:"browser-versions-34",level:3},{value:"Version 1.28",id:"version-128",level:2},{value:"Playwright Tools",id:"playwright-tools",level:3},{value:"Test Runner",id:"test-runner-7",level:3},{value:"New APIs",id:"new-apis-19",level:3},{value:"Browser Versions",id:"browser-versions-35",level:3},{value:"Version 1.27",id:"version-127",level:2},{value:"Locators",id:"locators-1",level:3},{value:"Other highlights",id:"other-highlights",level:3},{value:"Behavior Changes",id:"behavior-changes",level:3},{value:"Browser Versions",id:"browser-versions-36",level:3},{value:"Version 1.26",id:"version-126",level:2},{value:"Assertions",id:"assertions",level:3},{value:"Other highlights",id:"other-highlights-1",level:3},{value:"Behavior Change",id:"behavior-change",level:3},{value:"Browser Versions",id:"browser-versions-37",level:3},{value:"Version 1.25",id:"version-125",level:2},{value:"VSCode Extension",id:"vscode-extension",level:3},{value:"Test Runner",id:"test-runner-8",level:3},{value:"Announcements",id:"announcements-3",level:3},{value:"Browser Versions",id:"browser-versions-38",level:3},{value:"Version 1.24",id:"version-124",level:2},{value:"\u{1F30D} Multiple Web Servers in <code>playwright.config.ts</code>",id:"-multiple-web-servers-in-playwrightconfigts",level:3},{value:"\u{1F402} Debian 11 Bullseye Support",id:"-debian-11-bullseye-support",level:3},{value:"\u{1F575}\uFE0F Anonymous Describe",id:"\uFE0F-anonymous-describe",level:3},{value:"\u{1F9E9} Component Tests Update",id:"-component-tests-update",level:3},{value:"Version 1.23",id:"version-123",level:2},{value:"Network Replay",id:"network-replay",level:3},{value:"Advanced Routing",id:"advanced-routing",level:3},{value:"Web-First Assertions Update",id:"web-first-assertions-update",level:3},{value:"Component Tests Update",id:"component-tests-update",level:3},{value:"Miscellaneous",id:"miscellaneous-17",level:3},{value:"\u26A0\uFE0F Breaking Changes \u26A0\uFE0F",id:"\uFE0F-breaking-changes-\uFE0F",level:3},{value:"Version 1.22",id:"version-122",level:2},{value:"Highlights",id:"highlights-4",level:3},{value:"Version 1.21",id:"version-121",level:2},{value:"Highlights",id:"highlights-5",level:3},{value:"Behavior Changes",id:"behavior-changes-1",level:3},{value:"Browser Versions",id:"browser-versions-39",level:3},{value:"Version 1.20",id:"version-120",level:2},{value:"Highlights",id:"highlights-6",level:3},{value:"Announcements",id:"announcements-4",level:3},{value:"Browser Versions",id:"browser-versions-40",level:3},{value:"Version 1.19",id:"version-119",level:2},{value:"Playwright Test Update",id:"playwright-test-update",level:3},{value:"Other Updates",id:"other-updates",level:3},{value:"Potentially breaking change in Playwright Test Global Setup",id:"potentially-breaking-change-in-playwright-test-global-setup",level:3},{value:"Browser Versions",id:"browser-versions-41",level:3},{value:"Version 1.18",id:"version-118",level:2},{value:"Locator Improvements",id:"locator-improvements",level:3},{value:"Testing API improvements",id:"testing-api-improvements",level:3},{value:"Improved TypeScript Support",id:"improved-typescript-support",level:3},{value:"Create Playwright",id:"create-playwright",level:3},{value:"New APIs &amp; changes",id:"new-apis--changes",level:3},{value:"Breaking change: custom config options",id:"breaking-change-custom-config-options",level:3},{value:"Browser Versions",id:"browser-versions-42",level:3},{value:"Version 1.17",id:"version-117",level:2},{value:"Frame Locators",id:"frame-locators",level:3},{value:"Trace Viewer Update",id:"trace-viewer-update",level:3},{value:"HTML Report Update",id:"html-report-update",level:3},{value:"Ubuntu ARM64 support + more",id:"ubuntu-arm64-support--more",level:3},{value:"New APIs",id:"new-apis-20",level:3},{value:"Version 1.16",id:"version-116",level:2},{value:"\u{1F3AD} Playwright Test",id:"-playwright-test",level:3},{value:"API Testing",id:"api-testing",level:4},{value:"Response Interception",id:"response-interception",level:4},{value:"New HTML reporter",id:"new-html-reporter",level:4},{value:"\u{1F3AD} Playwright Library",id:"-playwright-library",level:3},{value:"locator.waitFor",id:"locatorwaitfor",level:4},{value:"Docker support for Arm64",id:"docker-support-for-arm64",level:3},{value:"\u{1F3AD} Playwright Trace Viewer",id:"-playwright-trace-viewer",level:3},{value:"Browser Versions",id:"browser-versions-43",level:3},{value:"Version 1.15",id:"version-115",level:2},{value:"\u{1F3AD} Playwright Library",id:"-playwright-library-1",level:3},{value:"\u{1F5B1}\uFE0F Mouse Wheel",id:"\uFE0F-mouse-wheel",level:4},{value:"\u{1F4DC}
1 New Headers API",id:"-new-headers-api",level:4},{value:"\u{1F308} Forced-Colors emulation",id:"-forced-colors-emulation",level:4},{value:"New APIs",id:"new-apis-21",level:4},{value:"\u{1F3AD} Playwright Test",id:"-playwright-test-1",level:3},{value:"\u{1F91D} <code>test.parallel()</code> run tests in the same file in parallel",id:"-testparallel-run-tests-in-the-same-file-in-parallel",level:4},{value:"\u{1F6E0} Add <code>--debug</code> CLI flag",id:"-add---debug-cli-flag",level:4},{value:"Browser Versions",id:"browser-versions-44",level:3},{value:"Version 1.14",id:"version-114",level:2},{value:"\u{1F3AD} Playwright Library",id:"-playwright-library-2",level:3},{value:"\u26A1\uFE0F New &quot;strict&quot; mode",id:"\uFE0F-new-strict-mode",level:4},{value:"\u{1F4CD} New <strong>Locators API</strong>",id:"-new-locators-api",level:4},{value:"\u{1F9E9} Experimental <strong>React</strong> and <strong>Vue</strong> selector engines",id:"-experimental-react-and-vue-selector-engines",level:4},{value:"\u2728 New <strong><code>nth</code></strong> and <strong><code>visible</code></strong> selector engines",id:"-new-nth-and-visible-selector-engines",level:4},{value:"\u{1F3AD} Playwright Test",id:"-playwright-test-2",level:3},{value:"\u2705 Web-First Assertions",id:"-web-first-assertions",level:4},{value:"\u26D3 Serial mode with <code>describe.serial</code>",id:"-serial-mode-with-describeserial",level:4},{value:"\u{1F43E} Steps API with <code>test.step</code>",id:"-steps-api-with-teststep",level:4},{value:"\u{1F30E} Launch web server before running tests",id:"-launch-web-server-before-running-tests",level:4},{value:"Browser Versions",id:"browser-versions-45",level:3},{value:"Version 1.13",id:"version-113",level:2},{value:"Playwright Test",id:"playwright-test",level:4},{value:"Playwright",id:"playwright",level:4},{value:"Tools",id:"tools",level:4},{value:"New and Overhauled Guides",id:"new-and-overhauled-guides",level:4},{value:"Browser Versions",id:"browser-versions-46",level:4},{value:"New Playwright APIs",id:"new-playwright-apis",level:4},{value:"Version 1.12",id:"version-112",level:2},{value:"\u26A1\uFE0F Introducing Playwright Test",id:"\uFE0F-introducing-playwright-test",level:4},{value:"\u{1F9DF}\u200D\u2642\uFE0F Introducing Playwright Trace Viewer",id:"\uFE0F-introducing-playwright-trace-viewer",level:4},{value:"Browser Versions",id:"browser-versions-47",level:4},{value:"New APIs",id:"new-apis-22",level:4},{value:"Version 1.11",id:"version-111",level:2},{value:"Browser Versions",id:"browser-versions-48",level:4},{value:"New APIs",id:"new-apis-23",level:4},{value:"Version 1.10",id:"version-110",level:2},{value:"Bundled Browser Versions",id:"bundled-browser-versions",level:4},{value:"New APIs",id:"new-apis-24",level:4},{value:"Version 1.9",id:"version-19",level:2},{value:"Browser Versions",id:"browser-versions-49",level:4},{value:"New APIs",id:"new-apis-25",level:4},{value:"Version 1.8",id:"version-18",level:2},{value:"New APIs",id:"new-apis-26",level:4},{value:"Browser Versions",id:"browser-versions-50",level:4},{value:"Version 1.7",id:"version-17",level:2},{value:"New APIs",id:"new-apis-27",level:4},{value:"Browser Versions",id:"browser-versions-51",level:4}];function h(e){let s={a:"a",blockquote:"blockquote",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(s.h2,{id:"version-163",children:"Version 1.63"}),"\n",(0,i.jsx)(s.h3,{id:"-test-locks",children:"\u{1F512} Test locks"}),"\n",(0,i.jsxs)(s.p,{children:["Tests that access a shared resource \u2014 an external service, a global account setting \u2014 can now declare a named ",(0,i.jsx)(s.code,{children:"lock"}),". Tests that share a lock name never run concurrently, across files, workers and ",(0,i.jsx)(s.a,{href:"/docs/test-projects",children:"projects"}),", while everything else keeps running in parallel:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"test('update user settings', { lock: 'user-settings' }, async ({ page }) =>
1 {\n  // never runs at the same time as other tests holding 'user-settings'\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["A test can hold multiple locks, and ",(0,i.jsx)(s.a,{href:"/docs/api/class-test#test-describe",children:"test.describe()"})," accepts a ",(0,i.jsx)(s.code,{children:"lock"})," for the whole group. Learn more about ",(0,i.jsx)(s.a,{href:"/docs/test-parallel#test-locks",children:"test locks"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"-locate-across-frames",children:"\u{1FA9F} Locate across frames"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-frame-locator",children:"page.frameLocator()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-frame#frame-frame-locator",children:"frame.frameLocator()"})," called without a selector search in any frame of the subtree, so you no longer need to locate the iframe first:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// Finds the button in any frame on the page.\nawait page.frameLocator().getByRole('button').click();\n"})}),"\n",(0,i.jsx)(s.p,{children:"The rest of the locator resolves inside a single frame, just like a regular locator, and an error is thrown when it matches elements in several frames."}),"\n",(0,i.jsx)(s.h3,{id:"\uFE0F-visible-only-locators",children:"\u{1F441}\uFE0F Visible-only locators"}),"\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-visible",children:"locator.visible()"})," returns a locator that matches only visible elements. It is the recommended replacement for the ",(0,i.jsx)(s.code,{children:":visible"})," CSS pseudo-class:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.locator('button').visible().click();\n"})}),"\n",(0,i.jsx)(s.h3,{id:"-step-params-and-subtitles",children:"\u{1F9FE} Step params and subtitles"}),"\n",(0,i.jsxs)(s.p,{children:["Steps now carry structured data for reporters. Playwright API steps report the target locator and call arguments, and ",(0,i.jsx)(s.a,{href:"/docs/api/class-test#test-step",children:"test.step()"})," accepts ",(0,i.jsx)(s.code,{children:"subtitle"})," and ",(0,i.jsx)(s.code,{children:"params"})," options for your own steps:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await test.step('Login', async () => {\n  // ...\n}, { subtitle: 'as admin', params: { user: 'admin' } });\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Reporters receive them via ",(0,i.jsx)(s.a,{href:"/docs/api/class-teststep#test-step-subtitle",children:"testStep.subtitle"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-teststep#test-step-params",children:"testStep.params"}),". For Playwright API steps, the subtitle is the locator or the navigation url \u2014 for example, ",(0,i.jsx)(s.code,{children:"Click"})," with subtitle ",(0,i.jsx)(s.code,{children:"getByRole('button')"}),". Both are rendered next to the step title in the trace viewer and the HTML report."]}),"\n",(0,i.jsx)(s.h3,{id:"\uFE0F-aria-and-screen-snapshots-in-traces",children:"\u{1F5BC}\uFE0F Aria and screen snapshots in traces"}),"\n",(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"snapshots"})," option of ",(0,i.jsx)(s.a,{href:"/docs/api/class-tracing#tracing-start",children:"tracing.start()"})," and the ",(0,i.jsx)(s.a,{href:"/docs/api/class-testoptions#test-options-trace",children:"testOptions.trace"})," fixture option now accept an object selecting what to capture on every action:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="playwright.config.ts"',children:"export default defineConfig({\n  use: {\n    trace: {\n      mode: 'on',\n      snapshots: { dom: true, aria: true, screen: true }\n    },\n  },\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["With aria and screen snapshots recorded, the new ",(0,i.jsx)(s.strong,{children:"Display Aria"})," mode in the trace viewer shows the action screenshot side by side with the aria snapshot, and hovering an aria node highlights it on the screenshot."]}),"\n",(0,i.jsx)(s.h3,{id:"new-apis",children:"New APIs"}),"\n",(0,i.jsx)(s.h4,{id:"browser-and-context",children:"Browser and Context"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-new-context-option-http-credentials",children:"httpCredentials"})," now also accepts an array of credentials. The first entry matching the request origin 
1is used, and entries without an origin match any request."]}),"\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-storage-state-option-opfs",children:"opfs"})," includes the ",(0,i.jsx)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system",children:"origin private file system"})," in the storage state, so it can be persisted and restored into later contexts."]}),"\n",(0,i.jsxs)(s.li,{children:["New events ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-event-dialog-closed",children:"page.on('dialogclosed')"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-event-dialog-closed",children:"browserContext.on('dialogclosed')"})," are emitted when a JavaScript dialog is accepted, dismissed or closed by the user."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"locators",children:"Locators"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-aria-snapshot-json",children:"locator.ariaSnapshotJSON()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-aria-snapshot-json",children:"page.ariaSnapshotJSON()"})," return the aria snapshot as a JSON value instead of YAML markup, with ",(0,i.jsx)(s.code,{children:"mode"}),", ",(0,i.jsx)(s.code,{children:"depth"})," and ",(0,i.jsx)(s.code,{children:"boxes"})," options."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-apirequestcontext#api-request-context-get",children:"apiRequestContext.get()"})," and other request methods accept a type argument that types the response ",(0,i.jsx)(s.code,{children:"json()"}),":"]}),"\n"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const response = await request.get<User>('/api/users/42');\nconst user = await response.json(); // typed as User\n"})}),"\n",(0,i.jsx)(s.h4,{id:"test-runner",children:"Test runner"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New standalone ",(0,i.jsx)(s.a,{href:"/docs/api/class-testoptions#test-options-reduced-motion",children:"testOptions.reducedMotion"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-testoptions#test-options-forced-colors",children:"testOptions.forcedColors"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-testoptions#test-options-contrast",children:"testOptions.contrast"})," options."]}),"\n",(0,i.jsxs)(s.li,{children:["New ",(0,i.jsx)(s.code,{children:"--add-reporter"})," command line option appends a reporter on top of the ones configured in ",(0,i.jsx)(s.code,{children:"playwright.config"}),", instead of replacing them like ",(0,i.jsx)(s.code,{children:"--reporter"})," does."]}),"\n",(0,i.jsxs)(s.li,{children:["New ",(0,i.jsx)(s.code,{children:"omitTags"})," option for the ",(0,i.jsx)(s.code,{children:"list"}),", ",(0,i.jsx)(s.code,{children:"line"}),", ",(0,i.jsx)(s.code,{children:"dot"}),", ",(0,i.jsx)(s.code,{children:"github"})," and ",(0,i.jsx)(s.code,{children:"junit"})," reporters suppresses the tags that are automatically appended to test titles."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"command-line",children:"Command line"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"npx playwright install --no-remove"})," keeps the browsers of other Playwright installations instead of removing them."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"npx playwright codegen --http-credentials"})," records against pages behind HTTP authentication."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"miscellaneous",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New built-in ",(0,i.jsx)(s.a,{href:"/docs/test-reporters#perfetto-reporter",children:(0,i.jsx)(s.code,{children:"perfetto"})})," reporter writes a Trace Event Format file for the ",(0,i.jsx)(s.a,{href:"https://ui.perfetto.dev",children:"Perfetto UI"})," or ",(0,i.jsx)(s.code,{children:"chrome://tracing"}),", rendering the test run as a timeline with a lane per worker."]}),"\n",(0,i.jsx)(s.li,{children:"The HTML report renders a duration waterfall next to test steps."}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"announcements",children:"Announcements"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\u26A0\uFE0F The experimental ",(0,i.jsx)(s.code,{children:"@playwright/experimental-ct-react"}),", ",(0,i.jsx)(s.code,{children:"@playwright/experimental-ct-react17"})," and ",(0,i.jsx)(s.code,{children:"@playwright/experimental-ct-vue"})," packages will no longer be updated. Follow the ",(0,i.jsx)(s.a,{href:"/docs/test-components#migration-from-the-experimental-packages",children:"migration guide"})," to move to the stories model introduced in 1.62. Story ids passed to ",(0,i.jsx)(s.a,{href:"/docs/api/class-fixtures#fixtures-mount",children:"fixtures.mou
1nt()"})," can now be typed through the generated ",(0,i.jsx)(s.code,{children:"Stories"})," registry."]}),"\n",(0,i.jsx)(s.li,{children:"\u26A0\uFE0F Ubuntu 20.04 is not supported anymore."}),"\n",(0,i.jsxs)(s.li,{children:["\u{1F427} On Linux arm64, Playwright now downloads the ",(0,i.jsx)(s.a,{href:"https://developer.chrome.com/blog/chrome-for-testing",children:"Chrome for Testing"})," build of Chromium, the same build used on all other platforms."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 153.0.8010.12"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 155.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 26.6"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 153"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 153"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-162",children:"Version 1.62"}),"\n",(0,i.jsx)(s.h3,{id:"-new-component-testing-model",children:"\u{1F9F1} New component testing model"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/test-components",children:"Component testing"})," moves to a ",(0,i.jsx)(s.strong,{children:"stories and galleries"})," model. A ",(0,i.jsx)(s.strong,{children:"story"})," wraps your component in one specific scenario \u2014 hard-coded props, mock data, providers \u2014 and a"]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"gallery"})," page that you serve renders stories on demand. The new ",(0,i.jsx)(s.a,{href:"/docs/api/class-fixtures#fixtures-mount",children:"fixtures.mount()"})," fixture navigates to the gallery, mounts a story by id, and returns a ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator",title:"Locator",children:"Locator"})," scoped to the story's root element:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"test('click should expand', async ({ mount }) => {\n  const component = await mount('components/Expandable/Stateful');\n  await component.getByRole('button').click();\n  await expect(component.getByTestId('expanded')).toHaveValue('true');\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Pass a story type as a template argument to type-check its props, and use ",(0,i.jsx)(s.code,{children:"update(props)"})," / ",(0,i.jsx)(s.code,{children:"unmount()"})," on the returned locator to re-render or tear down within a test."]}),"\n",(0,i.jsx)(s.h3,{id:"-cancel-operations-with-abortsignal",children:"\u{1F6D1} Cancel operations with AbortSignal"}),"\n",(0,i.jsxs)(s.p,{children:["Most operations and web-first assertions now accept a ",(0,i.jsx)(s.code,{children:"signal"})," option that takes an ",(0,i.jsx)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal",children:(0,i.jsx)(s.code,{children:"AbortSignal"})}),", letting you cancel long-running actions, navigations, waits, and assertions:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const controller = new AbortController();\nsetTimeout(() => controller.abort(), 1000);\n\nawait page.getByRole('button', { name: 'Submit' }).click({ signal: controller.signal });\nawait expect(page.getByText('Done')).toBeVisible({ signal: controller.signal });\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Providing a signal does not disable the default timeout; pass ",(0,i.jsx)(s.code,{children:"timeout: 0"})," to disable it."]}),"\n",(0,i.jsx)(s.h3,{id:"\uFE0F-webp-screenshots",children:"\u{1F5BC}\uFE0F WebP screenshots"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-pageassertions#page-assertions-to-have-screenshot-1",children:"expect(page).toHaveScreenshot()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-have-screenshot-1",children:"expect(locator).toHaveScreenshot()"})," can now store snapshots in the WebP format \u2014 just give the snapshot a ",(0,i.jsx)(s.code,{children:".webp"})," name:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// Visual comparisons store the golden snapshot as lossless WebP.\nawait expect(page).toHaveScreenshot('homepage.webp');
1\n\n// Standalone screenshots can trade quality for size with lossy WebP.\nawait page.screenshot({ path: 'homepage.webp', quality: 50 });\n"})}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-screenshot",children:"page.screenshot()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-screenshot",children:"locator.screenshot()"})," also accept ",(0,i.jsx)(s.code,{children:"webp"})," as a ",(0,i.jsx)(s.code,{children:"type"}),", where quality ",(0,i.jsx)(s.code,{children:"100"})," (the default) is lossless and lower values use lossy compression."]}),"\n",(0,i.jsx)(s.h3,{id:"-custom-test-filtering-with-reporterpreprocess",children:"\u{1F9E9} Custom test filtering with Reporter.preprocess()"}),"\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-reporter#reporter-preprocess",children:"reporter.preprocess()"})," hook runs after the configuration is resolved and before ",(0,i.jsx)(s.a,{href:"/docs/api/class-reporter#reporter-on-begin",children:"reporter.onBegin()"}),", letting a reporter mark individual tests as skipped, excluded, fixed, or failing through a ",(0,i.jsx)(s.a,{href:"/docs/api/class-testrun",title:"TestRun",children:"TestRun"})," object:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"class MyReporter {\n  async preprocess({ config, suite, testRun }) {\n    for (const test of suite.allTests()) {\n      if (shouldSkip(test))\n        testRun.skip(test);\n    }\n  }\n}\n"})}),"\n",(0,i.jsx)(s.h3,{id:"-isolated-retries",children:"\u{1F501} Isolated retries"}),"\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-retry-strategy",children:"testConfig.retryStrategy"})," controls when failed tests are retried. The default ",(0,i.jsx)(s.code,{children:"'immediate'"})," retries as soon as a worker is free; ",(0,i.jsx)(s.code,{children:"'isolated'"})," runs all retries at the end, one by one in a single worker, to minimize interference with the rest of the suite:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="playwright.config.ts"',children:"export default defineConfig({\n  retries: 2,\n  retryStrategy: 'isolated',\n});\n"})}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-1",children:"New APIs"}),"\n",(0,i.jsx)(s.h4,{id:"browser-and-context-1",children:"Browser and Context"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-storage-state-option-credentials",children:"credentials"})," includes the context's virtual WebAuthn ",(0,i.jsx)(s.a,{href:"/docs/api/class-credentials",title:"Credentials",children:"Credentials"})," (passkeys) in the storage state, so they can be persisted and re-seeded into later contexts."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"actions",children:"Actions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New ",(0,i.jsx)(s.code,{children:"scroll"})," option (",(0,i.jsx)(s.code,{children:'"auto"'})," | ",(0,i.jsx)(s.code,{children:'"none"'}),") on actions to opt out of Playwright's automatic scroll-into-view."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"network",children:"Network"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-apiresponse#api-response-timing",children:"apiResponse.timing()"})," returns resource timing information for an API response."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"evaluation",children:"Evaluation"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-wait-for-function",children:"locator.waitForFunction()"})," waits until a function \u2014 called with the matching element \u2014 returns a truthy value."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-evaluate",children:"page.evaluate()"})," and related methods now accept functions as evaluate arguments."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-add-init-script",children:"page.addInitScript()"})," / ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-add-init-script",children:"browserContext.addInitScript()"})," now accept functions as init-script arguments."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"command-line--mcp",children:"Command line & MCP"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Playwright now bundles the ",(0,i.jsx)(s.a,{href:"/docs/getting-started-mcp",children:"Playwright MCP"})," server and ",(0,i.jsx)(s.a,{href:"/docs/getting-started-cli",children:(0,i.jsx)(s.code,{children:"playwright-cli"})}),", runnable via ",(0,i.jsx)(s.code,{children:"npx playwright mcp"})," and ",(0,i.jsx)(s.code,{children:"npx playwright cli"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"reporters",children:"Reporters"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["The HTML report's ",(0,i.jsx)(s.strong,{children:"Merge files"})," grouping \u2014 previously only a UI toggle \u2014 can now be enabled from the config with the new ",(0,i.jsx)(s.code,{children:"mergeFiles"})," reporter option:"]}),"\n"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="playwright.config.ts"',children:"export default defineConfig({\n  reporter: [['html', { mergeFiles: true }]],\n});\n"})}),"\n",(0,i.jsx)(s.h3,{id:"announcements-1",children:"Announcements"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\u{1F4CB} The clipboard is now isolated from the operating system in headless mode, so tests that use ",(0,i.jsx)(s.code,{children:"navigator.clipboard"}
1)," no longer read or overwrite the clipboard of the machine running them."]}),"\n",(0,i.jsx)(s.li,{children:"\u26A0\uFE0F Debian 11 is not supported anymore."}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-1",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 151.0.7922.34"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 153.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 26.5"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 151"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 151"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-161",children:"Version 1.61"}),"\n",(0,i.jsx)(s.h3,{id:"-webauthn-passkeys",children:"\u{1F511} WebAuthn passkeys"}),"\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-credentials",title:"Credentials",children:"Credentials"})," virtual authenticator, available via ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-credentials",children:"browserContext.credentials"}),", lets tests register passkeys and answer ",(0,i.jsx)(s.code,{children:"navigator.credentials.create()"})," / ",(0,i.jsx)(s.code,{children:"navigator.credentials.get()"})," ceremonies in the page \u2014 no real hardware key required, works in all browsers:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const context = await browser.newContext();\n\n// Seed a passkey your backend provisioned for a test user.\nawait context.credentials.create('example.com', {\n  id: credentialId,\n  userHandle,\n  privateKey,\n  publicKey,\n});\nawait context.credentials.install();\n\nconst page = await context.newPage();\nawait page.goto('https://example.com/login');\n// The page's navigator.credentials.get() is answered with the seeded passkey.\n"})}),"\n",(0,i.jsxs)(s.p,{children:["You can also let the app register a passkey once in a setup test, read it back with ",(0,i.jsx)(s.a,{href:"/docs/api/class-credentials#credentials-get",children:"credentials.get()"}),", and seed it into later tests \u2014 see ",(0,i.jsx)(s.a,{href:"/docs/api/class-credentials",title:"Credentials",children:"Credentials"})," for details."]}),"\n",(0,i.jsx)(s.h3,{id:"\uFE0F-web-storage",children:"\u{1F5C3}\uFE0F Web Storage"}),"\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-webstorage",title:"WebStorage",children:"WebStorage"})," API, available via ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-local-storage",children:"page.localStorage"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-session-storage",children:"page.sessionStorage"}),", reads and writes the page's storage for the current origin:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.localStorage.setItem('token', 'abc');\nconst token = await page.localStorage.getItem('token');\nconst items = await page.sessionStorage.items();\n"})}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-2",children:"New APIs"}),"\n",(0,i.jsx)(s.h4,{id:"network-1",children:"Network"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-apiresponse#api-response-security-details",children:"apiResponse.securityDetails()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-apiresponse#api-response-server-addr",children:"apiResponse.serverAddr()"})," mirror the browser-side ",(0,i.jsx)(s.a,{href:"/docs/api/class-response#response-security-details",children:"response.securityDetails()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-response#response-server-addr",children:"response.serverAddr()"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"browser-and-screencast",children:"Browser and Screencast"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.code,{children:"artifactsDir"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsertype#browser-type-connect-over-cdp",children:"browserType.connectOverCDP()"})," controls where artifacts such as traces and downloads are stored when attached to an existing browser."]}
1),"\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.code,{children:"cursor"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-screencast#screencast-show-actions",children:"screencast.showActions()"})," controls the cursor decoration rendered for pointer actions."]}),"\n",(0,i.jsxs)(s.li,{children:["The ",(0,i.jsx)(s.code,{children:"onFrame"})," callback in ",(0,i.jsx)(s.a,{href:"/docs/api/class-screencast#screencast-start",children:"screencast.start()"})," now receives a ",(0,i.jsx)(s.code,{children:"timestamp"})," of when the frame was presented by the browser."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"test-runner-1",children:"Test runner"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["The ",(0,i.jsx)(s.a,{href:"/docs/api/class-testoptions#test-options-video",children:"testOptions.video"})," option now supports the same set of modes as ",(0,i.jsx)(s.code,{children:"trace"}),": new ",(0,i.jsx)(s.code,{children:"'on-all-retries'"}),", ",(0,i.jsx)(s.code,{children:"'retain-on-first-failure'"})," and ",(0,i.jsx)(s.code,{children:"'retain-on-failure-and-retries'"})," values. See the ",(0,i.jsx)(s.a,{href:"/docs/test-use-options#video-modes",children:"video modes table"})," for which runs are recorded and kept in each mode."]}),"\n",(0,i.jsxs)(s.li,{children:["Supported ",(0,i.jsx)(s.code,{children:"expect.soft.poll(...)"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-fullconfig#full-config-argv",children:"fullConfig.argv"})," \u2014 a snapshot of ",(0,i.jsx)(s.code,{children:"process.argv"})," from the runner process, handy for reading custom arguments passed after the ",(0,i.jsx)(s.code,{children:"--"})," separator."]}),"\n",(0,i.jsxs)(s.li,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-fullconfig#full-config-fail-on-flaky-tests",children:"fullConfig.failOnFlakyTests"})," mirrors the config option, so reporters can explain why a flaky run failed."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-testinfo#test-info-errors",children:"testInfo.errors"})," now lists each sub-error of an ",(0,i.jsx)(s.code,{children:"AggregateError"})," as a separate entry."]}),"\n",(0,i.jsxs)(s.li,{children:["New ",(0,i.jsx)(s.code,{children:"-G"})," command line shorthand for ",(0,i.jsx)(s.code,{children:"--grep-invert"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"\uFE0F-other-improvements",children:"\u{1F6E0}\uFE0F Other improvements"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Playwright now supports Ubuntu 26.04."}),"\n",(0,i.jsx)(s.li,{children:"HAR and trace recordings now include WebSocket requests."}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-2",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 149.0.7827.55"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 151.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 26.5"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 149"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 149"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-160",children:"Version 1.60"}),"\n",(0,i.jsx)(s.h3,{id:"-har-recording-on-tracing",children:"\u{1F310} HAR recording on Tracing"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-tracing#tracing-start-har",children:"tracing.startHar()"})," / ",(0,i.jsx)(s.a,{href:"/docs/api/class-tracing#tracing-stop-har",children:"tracing.stopHar()"})," expose HAR recording as a first-class tracing API, with the same ",(0,i.jsx)(s.code,{children:"content"}),", ",(0,i.jsx)(s.code,{children:"mode"})," and ",(0,i.jsx)(s.code,{children:"urlFilter"})," options as ",(0,i.jsx)(s.code,{children:"recordHar"}),". The returned ",(0,i.jsx)(s.a,{href:"/docs/api/class-disposable",title:"Disposable",children:"Disposable"})," makes it easy to scope a recording with ",(0,i.jsx)(s.code,{children:"await using"}),":"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await using har = await context.tracing.startHar('trace.har');\nconst page = await context.newPage();\nawait page.goto('https://playwright.dev');\n// HAR is finalized when `har` goes out of scope.\n"})}),"\n",(0,i.jsx)(s.h3,{id:"-drop-api",children:"\u{1FA9D} Drop API"}),"\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-drop",children:"locator.drop()"})," simulates an external drag-and-drop of files or clipboard-like data onto an element. Playwright dispatches ",(0,i.jsx)(s.code,{children:"dragenter"}),", ",(0,i.jsx)(s.code,{children:"dragover"}),", and ",(0,i.jsx)(s.code,{children:"drop"})," with a synthetic [DataTransfer] in the page context \u2014 works cross-browser and is great for testing upload zones:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.locator('#dropzone').drop({\n  files: { name: 'note.txt', mimeType: 'text/plain', buffer: Buffer.from('hello') },\n});\n\nawait page.locator('#dropzone').drop({\n  data: {\n    'text/plain': 'hello world',\n    'text/uri-l
1ist': 'https://example.com',\n  },\n});\n"})}),"\n",(0,i.jsx)(s.h3,{id:"-aria-snapshots",children:"\u{1F3AF} Aria snapshots"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-pageassertions#page-assertions-to-match-aria-snapshot",children:"expect(page).toMatchAriaSnapshot()"})," now works on a ",(0,i.jsx)(s.a,{href:"/docs/api/class-page",title:"Page",children:"Page"}),", in addition to a ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator",title:"Locator",children:"Locator"})," \u2014 equivalent to asserting against ",(0,i.jsx)(s.code,{children:"page.locator('body')"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["New ",(0,i.jsx)(s.code,{children:"boxes"})," option on ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-aria-snapshot",children:"locator.ariaSnapshot()"})," / ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-aria-snapshot",children:"page.ariaSnapshot()"})," appends each element's bounding box as ",(0,i.jsx)(s.code,{children:"[box=x,y,width,height]"}),", useful for AI consumption."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"-testabort",children:"\u{1F6D1} test.abort()"}),"\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-test#test-abort",children:"test.abort()"})," aborts the currently running test from a fixture, hook, or route handler with an optional message. Use it when you have detected an unrecoverable misuse and want to fail the test right away:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"test('does not publish to the shared page', async ({ page }) => {\n  await page.route('**/publish', route => {\n    test.abort('Tests must not publish to the shared page. Use the `clone` option.');\n    return route.abort();\n  });\n  // ...\n});\n"})}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-3",children:"New APIs"}),"\n",(0,i.jsx)(s.h4,{id:"browser-context-and-page",children:"Browser, Context and Page"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Event ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-event-context",children:"browser.on('context')"})," \u2014 fired when a new context is created on the browser."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext",title:"BrowserContext",children:"BrowserContext"})," now mirrors lifecycle events from its pages: ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-event-download",children:"browserContext.on('download')"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-event-frame-attached",children:"browserContext.on('frameattached')"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-event-frame-detached",children:"browserContext.on('framedetached')"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-event-frame-navigated",children:"browserContext.on('framenavigated')"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-event-page-close",children:"browserContext.on('pageclose')"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-event-page-load",children:"browserContext.on('pageload')"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"locators-and-assertions",children:"Locators and Assertions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.code,{children:"description"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-get-by-role",children:"page.getByRole()"})," / ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-get-by-role",children:"locator.getByRole()"})," / ",(0,i.jsx)(s.a,{href:"/docs/api/class-frame#frame-get-by-role",children:"frame.getByRole()"})," / ",(0,i.jsx)(s.a,{href:"/docs/api/class-framelocator#frame-locator-get-by-role",children:"frameLocator.getByRole()"})," for matching the ",(0,i.jsx)(s.a,{href:"https://www.w3.org/TR/wai-aria-1.2/#dfn-accessible-description",children:"accessible description"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.code,{children:"pseudo"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-have-css",children:"expect(locator).toHaveCSS()"})," reads computed styles from ",(0,i.jsx)(s.code,{children:"::before"})," or ",(0,i.jsx)(s.code,{children:"::after"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.code,{children:"style"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-highlight",children:"locator.highlight()"})," applies extra inline CSS to the highlight overlay, plus new ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-hide-highlight",children:"page.hideHighlight()"})," to clear all highlights."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"network-2",children:"Network"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-websocketroute#web-socket-route-protocols",children:"webSocketRoute.protocols()"})," returns the WebSocket subprotocols requested by the page."]}),"\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.code,{children:"noDefaults"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsertype#browser-type-connect-over-cdp",children:"browserType.connectOverC
1DP()"})," disables Playwright's default overrides on the default context (download behavior, focus emulation, media emulation), so attaching to a user's daily-driver browser doesn't disturb its state."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"errors-and-reporting",children:"Errors and Reporting"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-weberror#web-error-location",children:"webError.location()"})," mirrors ",(0,i.jsx)(s.a,{href:"/docs/api/class-consolemessage#console-message-location",children:"consoleMessage.location()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-consolemessage#console-message-location",children:"consoleMessage.location()"})," now exposes ",(0,i.jsx)(s.code,{children:"line"})," / ",(0,i.jsx)(s.code,{children:"column"})," properties (",(0,i.jsx)(s.code,{children:"lineNumber"})," / ",(0,i.jsx)(s.code,{children:"columnNumber"})," are deprecated)."]}),"\n",(0,i.jsxs)(s.li,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-testinfoerror#test-info-error-error-context",children:"testInfoError.errorContext"})," surfaces additional diagnostic context, such as the aria snapshot of the receiver at the time of an ",(0,i.jsx)(s.code,{children:"expect(...)"})," matcher failure."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-reporter#reporter-on-error",children:"reporter.onError()"})," now receives a ",(0,i.jsx)(s.code,{children:"workerInfo"})," argument with details about the worker for fixture teardown errors."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"test-runner-2",children:"Test runner"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New ",(0,i.jsx)(s.code,{children:"{testFileBaseName}"})," token in ",(0,i.jsx)(s.a,{href:"/docs/api/class-testproject#test-project-snapshot-path-template",children:"testProject.snapshotPathTemplate"})," \u2014 file name without extension."]}),"\n",(0,i.jsxs)(s.li,{children:["Test runner now errors when a config tries to override a non-option fixture, and rejects ",(0,i.jsx)(s.code,{children:"workers: 0"})," or negative values."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"\uFE0F-other-improvements-1",children:"\u{1F6E0}\uFE0F Other improvements"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["HTML reporter:","\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"npx playwright show-report"})," accepts ",(0,i.jsx)(s.code,{children:".zip"})," files directly \u2014 no need to unzip first."]}),"\n",(0,i.jsx)(s.li,{children:"Steps that contain attachments inside nested children show an indicator on the parent step."}),"\n",(0,i.jsxs)(s.li,{children:["The ",(0,i.jsx)(s.code,{children:"repeatEachIndex"})," is shown in the test header when non-zero."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.li,{children:"Trace Viewer adds a pretty-print toggle for JSON / form request and response bodies in the network details panel."}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"breaking-changes-\uFE0F",children:"Breaking Changes \u26A0\uFE0F"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Removed long-deprecated APIs:","\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"Locator.ariaRef()"})," \u2014 use the standard ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-aria-snapshot",children:"locator.ariaSnapshot()"})," pipeline."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"handle"})," option on ",(0,i.jsx)(s.code,{children:"BrowserContext.exposeBinding"})," and ",(0,i.jsx)(s.code,{children:"Page.exposeBinding"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"logger"})," option on ",(0,i.jsx)(s.code,{children:"BrowserType.connect"})," and ",(0,i.jsx)(s.code,{children:"BrowserType.connectOverCDP"})," \u2014 use ",(0,i.jsx)(s.a,{href:"/docs/trace-viewer",children:"tracing"})," instead."]}),"\n",(0,i.jsxs)(s.li,{children:["Context options ",(0,i.jsx)(s.code,{children:"videosPath"})," / ",(0,i.jsx)(s.code,{children:"videoSize"})," \u2014 use ",(0,i.jsx)(s.code,{children:"recordVideo"})," instead."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-3",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 148.0.7778.96"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 150.0.2"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 26.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 147"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 147"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-159",children:"Version 1.59"}),"\n",(0,i.jsx)(s.h3,{id:"-screencast",children:"\u{1F3AC} Screencast"}),"\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-screencast",children:"page.screencast"})," API provides a unified interface for capturing page content with:"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Screencast recordings"}),"\n",(0,i.jsx)(s.li,{children:"Action annotations"}),"\n",(0,i.jsx)(s.li,{children:"Visual overlays"}),"\n",(0,i.jsx)(s.li,{children:"Real-time frame capture"}),"\n",(0,i.jsx)(s.li,{children:"Agentic video receipts"}),"\n"]}),"\n",(0,i.jsx)("center",{children:(0,i.jsx)("img",{src:"https://raw.githubusercontent.com/microsoft/playwright/main/docs/src/images/release-notes-1.59-screencast-demo.gif",alt:"Demo",width:"500",height:"313"})}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Screencast recording"})," \u2014 record video with precise start/stop control, as an alternative to the ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-new-context-option-record-video",children:"recordVideo"})," option:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.screencast.start({ path: 'video.webm' });\n// ... perform actions ...\nawait page.screencast.stop();\n"})}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Action annotations"})," \u2014 enable built-in visual annotations that highlight interacted elements and display action titles during recording:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.screencast.showActions({ position: 'top-right' });\n"})}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-screencast#screencast-show-actions",children:"screencast.showActions()"})," accepts ",(0,i.jsx)(s.code,{children:"position"})," (",(0,i.jsx)(s.code,{children:"'top-left'"}),", ",(0,i.jsx)(s.code,{children:"'top'"}),", ",(0,i.jsx)(s.code,{children:"'top-right'"}),", ",(0,i.jsx)(s.code,{children:"'bottom-left'"}),", ",(0,i.jsx)(s.code,{children:"'bottom'"}),", ",(0,i.jsx)(s.code,{children:"'bottom-right'"}),"), ",(0,i.jsx)(s.code,{children:"duration"})," (ms per annotation), and ",(0,i.jsx)(s.code,{children:"fontSize"})," (px). Returns a disposable to stop showing actions."]}),"\n",(0,i.jsxs)(s.p,{children:["Action annotations can also be enabled in test fixtures via the ",(0,i.jsx)(s.code,{children:"video"})," option:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// playwright.config.ts\nex
1port default defineConfig({\n  use: {\n    video: {\n      mode: 'on',\n      show: {\n        actions: { position: 'top-left' },\n        test: { position: 'top-right' },\n      },\n    },\n  },\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Visual overlays"})," \u2014 add chapter titles and custom HTML overlays on top of the page for richer narration:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.screencast.showChapter('Adding TODOs', {\n  description: 'Type and press enter for each TODO',\n  duration: 1000,\n});\n\nawait page.screencast.showOverlay('<div style=\"color: red\">Recording</div>');\n"})}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Real-time frame capture"})," \u2014 stream JPEG-encoded frames for custom processing like thumbnails, live previews, AI vision, and more:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.screencast.start({\n  onFrame: ({ data }) => sendToVisionModel(data),\n  size: { width: 800, height: 600 },\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Agentic video receipts"})," \u2014 coding agents can produce video evidence of their work. After completing a task, an agent can record a walkthrough video with rich annotations for human review:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.screencast.start({ path: 'receipt.webm' });\nawait page.screencast.showActions({ position: 'top-right' });\n\nawait page.screencast.showChapter('Verifying checkout flow', {\n  description: 'Added coupon code support per ticket #1234',\n});\n\n// Agent performs the verification steps...\nawait page.locator('#coupon').fill('SAVE20');\nawait page.locator('#apply-coupon').click();\nawait expect(page.locator('.discount')).toContainText('20%');\n\nawait page.screencast.showChapter('Done', {\n  description: 'Coupon applied, discount reflected in total',\n});\n\nawait page.screencast.stop();\n"})}),"\n",(0,i.jsx)(s.p,{children:"The resulting video serves as a receipt: chapter titles provide context, action annotations highlight each interaction, and the visual walkthrough is faster to review than text logs."}),"\n",(0,i.jsx)(s.h3,{id:"-interoperability",children:"\u{1F517} Interoperability"}),"\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-bind",children:"browser.bind()"})," API makes a launched browser available for ",(0,i.jsx)(s.code,{children:"playwright-cli"}),", ",(0,i.jsx)(s.code,{children:"@playwright/mcp"}),", and other clients to connect to."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Bind a browser"})," \u2014 start a browser and bind it so others can connect:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const { endpoint } = await browser.bind('my-session', {\n  workspaceDir: '/my/project',\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Connect from playwright-cli"})," \u2014 connect to the running browser from your favorite coding agent."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"playwright-cli attach my-session\nplaywright-cli -s my-session snapshot\n"})}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Connect from @playwright/mcp"})," \u2014 or point your MCP server to the running browser."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"@playwright/mcp --endpoint=my-session\n"})}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Connect from a Playwright client"})," \u2014 use API to connect to the browser. Multiple clients at a time are supported!"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const browser = await chromium.connect(endpoint);\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Pass ",(0,i.jsx)(s.code,{children:"host"})," and ",(0,i.jsx)(s.code,{children:"port"})," options to bind over WebSocket instead of a named pipe:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const { endpoint } = await browser.bind('my-session', {\n  host: 'localhost',\n  port: 0,\n});\n// endpoint is a ws:// URL\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Call ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-unbind",children:"browser.unbind()"})," to stop accepting new connections."]}),"\n",(0,i.jsx)(s.h3,{id:"-observability",children:"\u{1F4CA} Observability"}),"\n",(0,i.jsxs)(s.p,{children:["Run ",(0,i.jsx)(s.code,{children:"playwright-cli show"})," to open the Dashboard that lists all the bound browsers, their statuses, and allows interacting with them:"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"See what your agent is doing on the background browsers"}),"\n",(0,i.jsx)(s.li,{children:"Click into the sessions for manual interventions"}),"\n",(0,i.jsx)(s.li,{children:"Open DevTools to inspect pages from the background browsers."}),"\n"]}),"\n",(0,i.jsx)("center",{children:(0,i.jsx)("img",{src:"https://raw.githubusercontent.com/microsoft/playwright/main/docs/src/images/release-notes-1.59-dashboard.png",alt:"Demo",width:"1169",height:"835"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"playwright-cli"})," binds all of its browsers automatically, so you can see what your agents are doing."]}),"\n",(0,i.jsxs)(s.li,{children:["Pass ",(0,i.jsx)(s.code,{children:"PLAYWRIGHT_DASHBOARD=1"})," env variable to see all ",(0,i.jsx)(s.code,{children:"@playwright/test"})," browsers in the dashboard."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"-cli-debugger-for-agents",children:"\u{1F41B} CLI debugger for agents"}),"\n",(0,i.jsxs)(s.p,{children:["Coding agents can now run ",(0,i.jsx)(s.code,{children:"npx playwright test --debug=cli"})," to attach and debug tests over ",(0,i.jsx)(s.code,{children:"playwright-cli"})," \u2014 perfect for automatically fixing tests in agentic workflows:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:'$ npx playwright test --debug=cli\n### Debugging Instructions\n- Run "playwright-cli attach tw-87b59e" to attach to this test\n\n$ playwright-cli attach tw-87b59e\n### Session `tw-87b59e` created, attached to `tw-87b59e`.\nRun commands with: playwright-cli --session=tw-87b59e <command>\n### Paused\n- Navigate to "/" at output/tests/example.spec.ts:4\n\n$ playwright-cli --session tw-87b59e step-over\n### Page\n- Page URL: https://playwright.dev/\n- Page Title: Fast and reliable end-to-e
1nd testing for modern web apps | Playwright\n### Paused\n- Expect "toHaveTitle" at output/tests/example.spec.ts:7\n'})}),"\n",(0,i.jsx)(s.h3,{id:"-cli-trace-analysis-for-agents",children:"\u{1F4CB} CLI trace analysis for agents"}),"\n",(0,i.jsxs)(s.p,{children:["Coding agents can run ",(0,i.jsx)(s.code,{children:"npx playwright trace"})," to explore ",(0,i.jsx)(s.a,{href:"/docs/trace-viewer",children:"Playwright Trace"})," and understand failing or flaky tests from the command line:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:'$ npx playwright trace open test-results/example-has-title-chromium/trace.zip\n  Title:        example.spec.ts:3 \u203A has title\n\n$ npx playwright trace actions --grep="expect"\n     # Time       Action                                                  Duration\n  \u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500  \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n    9. 0:00.859  Expect "toHaveTitle"                                        5.1s  \u2717\n\n$ npx playwright trace action 9\n  Expect "toHaveTitle"\n  Error: expect(page).toHaveTitle(expected) failed\n    Expected pattern: /Wrong Title/\n    Received string:  "Fast and reliable end-to-end testing for modern web apps | Playwright"\n    Timeout: 5000m
1s\n  Snapshots\n    available: before, after\n    usage:     npx playwright trace snapshot 9 --name <before|after>\n\n$ npx playwright trace snapshot 9 --name after\n### Page\n- Page Title: Fast and reliable end-to-end testing for modern web apps | Playwright\n\n$ npx playwright trace close\n'})}),"\n",(0,i.jsxs)(s.h3,{id:"\uFE0F-await-using",children:["\u267B\uFE0F ",(0,i.jsx)(s.code,{children:"await using"})]}),"\n",(0,i.jsxs)(s.p,{children:["Many APIs now return ",(0,i.jsx)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/asyncDispose",children:"async disposables"}),", enabling the ",(0,i.jsx)(s.code,{children:"await using"})," syntax for automatic cleanup:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await using page = await context.newPage();\n{\n  await using route = await page.route('**/*', route => route.continue());\n  await using script = await page.addInitScript('console.log(\"init script here\")');\n  await page.goto('https://playwright.dev');\n  // do something\n}\n// route and init script have been removed at this point\n"})}
1),"\n",(0,i.jsx)(s.h3,{id:"-snapshots-and-locators",children:"\u{1F50D} Snapshots and Locators"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Method ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-aria-snapshot",children:"page.ariaSnapshot()"})," to capture the aria snapshot of the page \u2014 equivalent to ",(0,i.jsx)(s.code,{children:"page.locator('body').ariaSnapshot()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["Options ",(0,i.jsx)(s.code,{children:"depth"})," and ",(0,i.jsx)(s.code,{children:"mode"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-aria-snapshot",children:"locator.ariaSnapshot()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["Method ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-normalize",children:"locator.normalize()"})," converts a locator to follow best practices like test ids and aria roles."]}),"\n",(0,i.jsxs)(s.li,{children:["Method ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-pick-locator",children:"page.pickLocator()"})," enters an interactive mode where hovering over elements highlights them and shows the corresponding locator. Click an element to get its ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator",title:"Locator",children:"Locator"})," back. Use ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-cancel-pick-locator",children:"page.cancelPickLocator()"})," to cancel."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-4",children:"New APIs"}),"\n",(0,i.jsx)(s.h4,{id:"screencast",children:"Screencast"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-screencast",children:"page.screencast"})," provides video recording, real-time frame streaming, and overlay management."]}),"\n",(0,i.jsxs)(s.li,{children:["Methods ",(0,i.jsx)(s.a,{href:"/docs/api/class-screencast#screencast-start",children:"screencast.start()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-screencast#screencast-stop",children:"screencast.stop()"})," for recording and frame capture."]}),"\n",(0,i.jsxs)(s.li,{children:["Methods ",(0,i.jsx)(s.a,{href:"/docs/api/class-screencast#screencast-show-actions",children:"screencast.showActions()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-screencast#screencast-hide-actions",children:"screencast.hideActions()"})," for action annotations."]}),"\n",(0,i.jsxs)(s.li,{children:["Methods ",(0,i.jsx)(s.a,{href:"/docs/api/class-screencast#screencast-show-chapter",children:"screencast.showChapter()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-screencast#screencast-show-overlay",children:"screencast.showOverlay()"})," for visual overlays."]}),"\n",(0,i.jsxs)(s.li,{children:["Methods ",(0,i.jsx)(s.a,{href:"/docs/api/class-screencast#screencast-show-overlays",children:"screencast.showOverlays()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-screencast#screencast-hide-overlays",children:"screencast.hideOverlays()"})," for overlay visibility control."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"storage-console-and-errors",children:"Storage, Console and Errors"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Method ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-set-storage-state",children:"browserContext.setStorageState()"})," clears existing cookies, local storage, and IndexedDB for all origins and sets a new storage state \u2014 no need to create a new context."]}),"\n",(0,i.jsxs)(s.li,{children:["Methods ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-clear-console-messages",children:"page.clearConsoleMessages()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-clear-page-errors",children:"page.clearPageErrors()"})," to clear stored messages and errors."]}),"\n",(0,i.jsxs)(s.li,{children:["Option ",(0,i.jsx)(s.code,{children:"filter"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-console-messages",children:"page.consoleMessages()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-page-errors",children:"page.pageErrors()"})," controls which messages are returned."]}),"\n",(0,i.jsxs)(s.li,{children:["Method ",(0,i.jsx)(s.a,{href:"/docs/api/class-consolemessage#console-message-timestamp",children:"consoleMessage.timestamp()"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"miscellaneous-1",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-debugger",children:"browserContext.debugger"})," provides programmatic control over the Playwright debugger."]}),"\n",(0,i.jsxs)(s.li,{children:["Method ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-is-closed",children:"browserContext.
1isClosed()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["Method ",(0,i.jsx)(s.a,{href:"/docs/api/class-request#request-existing-response",children:"request.existingResponse()"})," returns the response without waiting."]}),"\n",(0,i.jsxs)(s.li,{children:["Method ",(0,i.jsx)(s.a,{href:"/docs/api/class-response#response-http-version",children:"response.httpVersion()"})," returns the HTTP version used by the response."]}),"\n",(0,i.jsxs)(s.li,{children:["Events ",(0,i.jsx)(s.a,{href:"/docs/api/class-cdpsession#cdp-session-event-event",children:"cdpSession.on('event')"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-cdpsession#cdp-session-event-close",children:"cdpSession.on('close')"})," for CDP sessions."]}),"\n",(0,i.jsxs)(s.li,{children:["Option ",(0,i.jsx)(s.code,{children:"live"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-tracing#tracing-start",children:"tracing.start()"})," for real-time trace updates."]}),"\n",(0,i.jsxs)(s.li,{children:["Option ",(0,i.jsx)(s.code,{children:"artifactsDir"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsertype#browser-type-launch",children:"browserType.launch()"})," to configure the artifacts directory."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"\uFE0F-other-improvements-2",children:"\u{1F6E0}\uFE0F Other improvements"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"UI Mode has an option to only show tests affected by source changes."}),"\n",(0,i.jsx)(s.li,{children:"UI Mode and Trace Viewer have improved action filtering."}),"\n",(0,i.jsx)(s.li,{children:"HTML Reporter shows the list of runs from the same worker."}),"\n",(0,i.jsx)(s.li,{children:"HTML Reporter allows filtering test steps for quick search."}),"\n",(0,i.jsxs)(s.li,{children:["New trace mode ",(0,i.jsx)(s.code,{children:"'retain-on-failure-and-retries'"})," records a trace for each test run and retains all traces when an attempt fails \u2014 great for comparing a passing trace with a failing one from a flaky test."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"breaking-changes-\uFE0F-1",children:"Breaking Changes \u26A0\uFE0F"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Removed macOS 14 support for WebKit. We recommend upgrading your macOS version, or keeping an older Playwright version."}),"\n",(0,i.jsxs)(s.li,{children:["Removed ",(0,i.jsx)(s.code,{children:"@playwright/experimental-ct-svelte"})," package."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"junit"})," test reporter now differentiates between types of errors, so some of the previous ",(0,i.jsx)(s.code,{children:"<failure>"}),"s are now reported as ",(0,i.jsx)(s.code,{children:"<error>"}),"s."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-4",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 147.0.7727.15"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 148.0.2"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 26.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 146"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 146"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-158",children:"Version 1.58"}),"\n",(0,i.jsx)(s.h3,{id:"timeline",children:"Timeline"}),"\n",(0,i.jsxs)(s.p,{children:["If you're using ",(0,i.jsx)(s.a,{href:"/docs/test-sharding#merging-reports-from-multiple-environments",children:"merged reports"}),", the HTML report Speedboard tab now shows the Timeline:"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Timeline chart in the HTML report",src:n(24314).A+"",width:"2788",height:"1536"})}),"\n",(0,i.jsx)(s.h3,{id:"ui-mode-and-trace-viewer-improvements",children:"UI Mode and Trace Viewer Improvements"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"New 'system' theme option follows your OS dark/light mode preference"}),"\n",(0,i.jsx)(s.li,{children:"Search functionality (Cmd/Ctrl+F) is now available in code editors"}),"\n",(0,i.jsx)(s.li,{children:"Network details panel has been reorganized for better usability"}),"\n",(0,i.jsx)(s.li,{children:"JSON responses are now automatically formatted for readability"}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["Thanks to ",(0,i.jsx)(s.a,{href:"https://github.com/cpAdm",children:"@cpAdm"})," for contributing these improvements!"]}),"\n",(0,i.jsx)(s.h3,{id:"miscellaneous-2",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-browsertype#browser-type-connect-over-cdp",children:"browserType.connectOverC
1DP()"})," now accepts an ",(0,i.jsx)(s.code,{children:"isLocal"})," option. When set to ",(0,i.jsx)(s.code,{children:"true"}),", it tells Playwright that it runs on the same host as the CDP server, enabling file system optimizations."]}),"\n",(0,i.jsx)(s.h3,{id:"breaking-changes-\uFE0F-2",children:"Breaking Changes \u26A0\uFE0F"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Removed ",(0,i.jsx)(s.code,{children:"_react"})," and ",(0,i.jsx)(s.code,{children:"_vue"})," selectors. See ",(0,i.jsx)(s.a,{href:"/docs/locators",children:"locators guide"})," for alternatives."]}),"\n",(0,i.jsxs)(s.li,{children:["Removed ",(0,i.jsx)(s.code,{children:":light"})," selector engine suffix. Use standard CSS selectors instead."]}),"\n",(0,i.jsxs)(s.li,{children:["Option ",(0,i.jsx)(s.code,{children:"devtools"})," from ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsertype#browser-type-launch",children:"browserType.launch()"})," has been removed. Use ",(0,i.jsx)(s.code,{children:"args: ['--auto-open-devtools-for-tabs']"})," instead."]}),"\n",(0,i.jsx)(s.li,{children:"Removed macOS 13 support for WebKit. We recommend to upgrade your macOS version, or keep using an older Playwright version."}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-5",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 145.0.7632.6"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 146.0.1"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 26.0"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 144"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 144"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-157",children:"Version 1.57"}),"\n",(0,i.jsx)(s.h3,{id:"speedboard",children:"Speedboard"}),"\n",(0,i.jsx)(s.p,{children:'In HTML reporter, there\'s a new tab we call "Speedboard":'}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"Speedboard",src:n(78344).A+"",width:"2932",height:"1924"})}),"\n",(0,i.jsx)(s.p,{children:"It shows you all your executed tests sorted by slowness, and can help you understand where your test suite is taking longer than expected. Take a look at yours - maybe you'll find some tests that are spending a longer time waiting than they should!"}),"\n",(0,i.jsx)(s.h3,{id:"chrome-for-testing",children:"Chrome for Testing"}),"\n",(0,i.jsxs)(s.p,{children:["Playwright now runs on ",(0,i.jsx)(s.a,{href:"https://googlechromelabs.github.io/chrome-for-testing/",children:"Chrome for Testing"})," builds rather than Chromium. Headed mode uses ",(0,i.jsx)(s.code,{children:"chrome"}),"; headless mode uses ",(0,i.jsx)(s.code,{children:"chrome-headless-shell"}),". Existing tests should continue to pass after upgrading to v1.57."]}),"\n",(0,i.jsx)(s.p,{children:"We're expecting no functional changes to come from this switch. The biggest change is the new icon and title in your toolbar."}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.img,{alt:"new and old logo",src:n(88467).A+"",width:"571",height:"220"})}),"\n",(0,i.jsxs)(s.p,{children:["If you still see an unexpected behaviour change, please ",(0,i.jsx)(s.a,{href:"https://github.com/microsoft/playwright/issues/new",children:"file an issue"}),"."]}),"\n",(0,i.jsx)(s.p,{children:"On Arm64 Linux, Playwright continues to use Chromium."}),"\n",(0,i.jsx)(s.h3,{id:"waiting-for-webserver-output",children:"Waiting for webserver output"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-web-server",children:"testConfig.webServer"})," added a ",(0,i.jsx)(s.code,{children:"wait"})," field. Pass a regular expression, and Playwright will wait until the webserver logs match it."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"import { defineConfig } from '@playwright/test';\n\nexport default defineConfig({\n  webServer: {\n    command: 'npm run start',\n    wait: {\n      stdout: /Listening on port (?<my_server_port>\\d+)/\n    },\n  },\n});\n"})}),"\n",(0,i.jsx)(s.p,{children:"If you include a named capture group into the expression, then Playwright will provide the capture group contents via environment variables:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"import { test, expect } from '@playwright/test';\n\ntest.use({ baseURL: `http://localhost:${process.env.MY_SERVER_PORT ?? 3000}` });\n\ntest('homepage', async ({ page }) =>
1 {\n  await page.goto('/');\n});\n"})}),"\n",(0,i.jsx)(s.p,{children:"This is not just useful for capturing varying ports of dev servers. You can also use it to wait for readiness of a service that doesn't expose an HTTP readiness check, but instead prints a readiness message to stdout or stderr."}),"\n",(0,i.jsx)(s.h3,{id:"breaking-change",children:"Breaking Change"}),"\n",(0,i.jsxs)(s.p,{children:["After 3 years of being deprecated, we removed ",(0,i.jsx)(s.code,{children:"page.accessibility"})," from our API. Please use other libraries such as ",(0,i.jsx)(s.a,{href:"https://www.deque.com/axe/",children:"Axe"})," if you need to test page accessibility. See our Node.js ",(0,i.jsx)(s.a,{href:"https://playwright.dev/docs/accessibility-testing",children:"guide"})," for integration with Axe."]}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-5",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New property ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-tag",children:"testConfig.tag"})," adds a tag to all tests in this run. This is useful when using ",(0,i.jsx)(s.a,{href:"/docs/test-sharding#merging-reports-from-multiple-shards",children:"merge-reports"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-worker#worker-event-console",children:"worker.on('console')"})," event is emitted when JavaScript within the worker calls one of console API methods, e.g. console.log or console.dir. ",(0,i.jsx)(s.a,{href:"/docs/api/class-worker#worker-wait-for-event",children:"worker.waitForEvent()"})," can be used to wait for it."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-description",children:"locator.de
1scription()"})," returns locator description previously set with ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-describe",children:"locator.describe()"}),", and ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-to-string",children:"locator.toString()"})," now uses the description when available."]}),"\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-click-option-steps",children:"steps"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-click",children:"locator.click()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-drag-to",children:"locator.dragTo()"})," that configures the number of ",(0,i.jsx)(s.code,{children:"mousemove"})," events emitted while moving the mouse pointer to the target element."]}),"\n",(0,i.jsxs)(s.li,{children:["Network requests issued by ",(0,i.jsx)(s.a,{href:"/docs/service-workers#network-events-and-routing",children:"Service Workers"})," are now reported and can be routed through the ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext",children:"BrowserContext"}),", only in Chromium. You can opt out using the ",(0,i.jsx)(s.code,{children:"PLAYWRIGHT_DISABLE_SERVICE_WORKER_NETWORK"})," environment variable."]}),"\n",(0,i.jsxs)(s.li,{children:["Console messages from Service Workers are dispatched through ",(0,i.jsx)(s.a,{href:"/docs/api/class-worker#worker-event-console",children:"worker.on('console')"}),". You can opt out of this using the ",(0,i.jsx)(s.code,{children:"PLAYWRIGHT_DISABLE_SERVICE_WORKER_CONSOLE"})," environment variable."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"miscellaneous-3",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Playwright docker images switched from Node.js v22 to Node.js v24 LTS."}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-6",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 143.0.7499.4"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 144.0.2"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 26.0"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-156",children:"Version 1.56"}),"\n",(0,i.jsx)(o.A,{id:"_AifxZGxwuk",title:"Playwright 1.56 - Introducing Playwright Test Agents"}),"\n",(0,i.jsx)(s.h3,{id:"playwright-test-agents",children:"Playwright Test Agents"}),"\n",(0,i.jsx)(s.p,{children:"Introducing Playwright Test Agents, three custom agent definitions designed to guide LLMs through the core process of building a Playwright test:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"\u{1F3AD} planner"})," explores the app and produces a Markdown test plan"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"\u{1F3AD} generator"})," transforms the Markdown plan into the Playwright Test files"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"\u{1F3AD} healer"})," executes the test suite and automatically repairs failing tests"]}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["Run ",(0,i.jsx)(s.code,{children:"npx playwright init-agents"})," with your client of choice to generate the latest agent definitions:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"# Generate agent files for each agentic loop\n# Visual Studio Code\nnpx playwright init-agents --loop=vscode\n# Claude Code\nnpx playwright init-agents --loop=claude\n# opencode\nnpx playwright init-agents --loop=opencode\n"})}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.a,{href:"/docs/test-agents",children:"Learn more about Playwright Test Agents"})}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-6",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New methods ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-console-messages",children:"page.consoleMessages()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-page-errors",children:"page.pageErrors()"})," for retrieving the most recent console messages from the page"]}),"\n",(0,i.jsxs)(s.li,{children:["New method ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-requests",children:"page.requests()"})," for retrieving the most recent network requests from the page"]}),"\n",(0,i.jsxs)(s.li,{children:["Added ",(0,i.jsxs)(s.a,{href:"/docs/test-cli#test-list",children:[(0,i.jsx)(s.code,{children:"--test-list"})," and ",(0,i.jsx)(s.code,{children:"--test-list-invert"})]})," to allow manual specification of specific tests from a file"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"ui-mode-and-html-reporter",children:"UI Mode and HTML Reporter"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Added option to ",(0,i.jsx)(s.code,{children:"'html'"}),' reporter to disable the "Copy prompt" button']}),"\n",(0,i.jsxs)(s.li,{children:["Added option to ",(0,i.jsx)(s.code,{children:"'html'"})," reporter and UI Mode to merge files, collapsing test and describe blocks into a single unified list"]}),"\n",(0,i.jsxs)(s.li,{children:["Added option to UI Mode mirroring the ",(0,i.jsx)(s.code,{children:"--update-snapsh
1ots"})," options"]}),"\n",(0,i.jsx)(s.li,{children:"Added option to UI Mode to run only a single worker at a time"}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"breaking-changes",children:"Breaking Changes"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Event ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-event-background-page",children:"browserContext.on('backgroundpage')"})," has been deprecated and will not be emitted. Method ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-background-pages",children:"browserContext.backgroundPages()"})," will return an empty list"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"miscellaneous-4",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Aria snapshots render and compare ",(0,i.jsx)(s.code,{children:"input"})," ",(0,i.jsx)(s.code,{children:"placeholder"})]}),"\n",(0,i.jsxs)(s.li,{children:["Added environment variable ",(0,i.jsx)(s.code,{children:"PLAYWRIGHT_TEST"})," to Playwright worker processes to allow discriminating on testing status"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-7",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 141.0.7390.37"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 142.0.1"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 26.0"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-155",children:"Version 1.55"}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-7",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New Property ",(0,i.jsx)(s.a,{href:"/docs/api/class-teststepinfo#test-step-info-title-path",children:"testStepInfo.titlePath"})," Returns the full title path starting from the test file, including test and step titles."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"codegen",children:"Codegen"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Automatic ",(0,i.jsx)(s.code,{children:"toBeVisible()"})," assertions: Codegen can now generate automatic ",(0,i.jsx)(s.code,{children:"toBeVisible()"})," assertions for common UI interactions. This feature can be enabled in the Codegen settings UI."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"breaking-changes-1",children:"Breaking Changes"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"\u26A0\uFE0F Dropped support for Chromium extension manifest v2."}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"miscellaneous-5",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:'Added support for Debian 13 "Trixie".'}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-8",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 140.0.7339.16"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 141.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 26.0"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 139"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 139"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-154",children:"Version 1.54"}),"\n",(0,i.jsx)(s.h3,{id:"highlights",children:"Highlights"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New cookie property ",(0,i.jsx)(s.code,{children:"partitionKey"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-cookies",children:"browserContext.cookies()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-add-cookies",children:"browserContext.addCookies()"}),". This property allows to save and restore partitioned cookies. See ",(0,i.jsx)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/Privacy/Guides/Privacy_sandbox/Partitioned_cookies",children:"CHIPS MDN article"})," for more information. Note that browsers have different support and defaults for cookie partitioning."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New option ",(0,i.jsx)(s.code,{children:"noSnippets"})," to disable code snippets in the html report."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"import { defineConfig } from '@playwright/test';
1\n\nexport default defineConfig({\n  reporter: [['html', { noSnippets: true }]]\n});\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New property ",(0,i.jsx)(s.code,{children:"location"})," in test annotations, for example in ",(0,i.jsx)(s.a,{href:"/docs/api/class-testresult#test-result-annotations",children:"testResult.annotations"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-testinfo#test-info-annotations",children:"testInfo.annotations"}),". It shows where the annotation like ",(0,i.jsx)(s.code,{children:"test.skip"})," or ",(0,i.jsx)(s.code,{children:"test.fixme"})," was added."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"command-line-1",children:"Command Line"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New option ",(0,i.jsx)(s.code,{children:"--user-data-dir"})," in multiple commands. You can specify the same user data dir to reuse browsing state, like authentication, between sessions."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"npx playwright codegen --user-data-dir=./user-data\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Option ",(0,i.jsx)(s.code,{children:"-gv"})," has been removed from the ",(0,i.jsx)(s.code,{children:"npx playwright test"})," command. Use ",(0,i.jsx)(s.code,{children:"--grep-invert"})," instead."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"npx playwright open"})," does not open the test recorder anymore. Use ",(0,i.jsx)(s.code,{children:"npx playwright codegen"})," instead."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"miscellaneous-6",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Support for Node.js 16 has been removed."}),"\n",(0,i.jsx)(s.li,{children:"Support for Node.js 18 has been deprecated, and will be removed in the future."}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-9",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 139.0.7258.5"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 140.0.2"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 26.0"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 140"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 140"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-153",children:"Version 1.53"}),"\n",(0,i.jsx)(s.h3,{id:"trace-viewer-and-html-reporter-updates",children:"Trace Viewer and HTML Reporter Updates"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:"New Steps in Trace Viewer and HTML reporter:"}),"\n",(0,i.jsx)("img",{src:"https://github.com/user-attachments/assets/1963ff7d-4070-41be-a79b-4333176921a2",alt:"New Trace Viewer Steps",width:"1562",height:"1364"}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New option in ",(0,i.jsx)(s.code,{children:"'html'"})," reporter to set the title of a specific test run:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"import { defineConfig } from '@playwright/test';\n\nexport default defineConfig({\n  reporter: [['html', { title: 'Custom test run #1028' }]]\n});\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"miscellaneous-7",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New option ",(0,i.jsx)(s.a,{href:"/docs/api/class-testinfo#test-info-snapshot-path-option-kind",children:"kind"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-testinfo#test-info-snapshot-path",children:"testInfo.snapshotPath()"})," controls which snapshot path template is used."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New method ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-describe",children:"locator.de
1scribe()"})," to describe a locator. Used for trace viewer and reports."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const button = page.getByTestId('btn-sub').describe('Subscribe button');\nawait button.click();\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"npx playwright install --list"})," will now list all installed browsers, versions and locations."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-10",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 138.0.7204.4"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 139.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 18.5"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 137"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 137"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-152",children:"Version 1.52"}),"\n",(0,i.jsx)(s.h3,{id:"highlights-1",children:"Highlights"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New method ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-contain-class",children:"expect(locator).toContainClass()"})," to ergonomically assert individual class names on the element."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:"await expect(page.getByRole('listitem', { name: 'Ship v1.52' })).toContainClass('done');\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/aria-snapshots",children:"Aria Snapshots"})," got two new properties: ",(0,i.jsx)(s.a,{href:"/docs/aria-snapshots#strict-matching",children:(0,i.jsx)(s.code,{children:"/children"})})," for strict matching and ",(0,i.jsx)(s.a,{href:"/docs/aria-snapshots#links",children:(0,i.jsx)(s.code,{children:"/url"})})," for links."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-ts",children:'await expect(locator).toMatchAriaSnapshot(`\n  - list\n    - /children: equal\n    - listitem: Feature A\n    - listitem:\n      - link "Feature B":\n        - /url: "https://playwright.dev"\n`);\n'})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"test-runner-3",children:"Test Runner"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New property ",(0,i.jsx)(s.a,{href:"/docs/api/class-testproject#test-project-workers",children:"testProject.workers"})," allows to specify the number of concurrent worker processes to use for a test project. The global limit of property ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-workers",children:"testConfig.workers"})," still applies."]}),"\n",(0,i.jsxs)(s.li,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-fail-on-flaky-tests",children:"testConfig.failOnFlakyTests"})," option to fail the test run if any flaky tests are detected, similarly to ",(0,i.jsx)(s.code,{children:"--fail-on-flaky-tests"}),". This is useful for CI/CD environments where you want to ensure that all tests are stable before deploying."]}),"\n",(0,i.jsxs)(s.li,{children:["New property ",(0,i.jsx)(s.a,{href:"/docs/api/class-testresult#test-result-annotations",children:"testResult.annotations"})," contains annotations for each test retry."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"miscellaneous-8",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.a,{href:"/docs/api/class-apirequest#api-request-new-context-option-max-redirects",children:"maxRedirects"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-apirequest#api-request-new-context",children:"apiRequest.newContext()"})," to control the maximum number of redirects."]}),"\n",(0,i.jsxs)(s.li,{children:["HTML reporter now supports ",(0,i.jsx)(s.em,{children:"NOT filtering"})," via ",(0,i.jsx)(s.code,{children:"!@my-tag"})," or ",(0,i.jsx)(s.code,{children:"!my-file.spec.ts"})," or ",(0,i.jsx)(s.code,{children:"!p:my-project"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"breaking-changes-2",children:"Breaking Changes"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Glob URL patterns in methods like ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-route",children:"page.route()"})," do not support ",(0,i.jsx)(s.code,{children:"?"})," and ",(0,i.jsx)(s.code,{children:"[]"})," anymore. We recommend using regular expressions instead."]}),"\n",(0,i.jsxs)(s.li,{children:["Method ",(0,i.jsx)(s.a,{href:"/docs/api/class-route#route-continue",children:"route.continue()"})," does not allow to override the ",(0,i.jsx)(s.code,{children:"Cookie"})," header anymore. If a ",(0,i.jsx)(s.code,{children:"Cookie"})," header is provided, it will be ignored, and the cookie will be loaded from the browser's cookie store. To set custom cookies, use ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-add-cookies",children:"browserContext.addCookies()"}),"."]}),"\n",(0,i.jsx)(s.li,{children:"macOS 13 is now deprecated and will no longer receive WebKit updates. Please upgrade to a more recent macOS version to continue benef
1iting from the latest WebKit improvements."}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-11",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 136.0.7103.25"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 137.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 18.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 135"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 135"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-151",children:"Version 1.51"}),"\n",(0,i.jsx)(s.h3,{id:"storagestate-for-indexeddb",children:"StorageState for indexedDB"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New option ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-storage-state-option-indexed-db",children:"indexedDB"})," for ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-storage-state",children:"browserContext.storageState()"})," allows to save and restore IndexedDB contents. Useful when your application uses ",(0,i.jsx)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API",children:"IndexedDB API"})," to store authentication tokens, like Firebase Authentication."]}),"\n",(0,i.jsxs)(s.p,{children:["Here is an example following the ",(0,i.jsx)(s.a,{href:"/docs/auth#basic-shared-account-in-all-tests",children:"authentication guide"}),":"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="tests/auth.setup.ts"',children:"import { test as setup, expect } from '@playwright/test';\nimport path from 'path';\n\nconst authFile = path.join(__dirname, '../playwright/.auth/user.json');\n\nsetup('authenticate', async ({ page }) => {\n  await page.goto('/');\n  // ... perform authentication steps ...\n\n  // make sure to save indexedDB\n  await page.context().storageState({ path: authFile, indexedDB: true });\n});\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"copy-as-prompt",children:"Copy as prompt"}),"\n",(0,i.jsx)(s.p,{children:'New "Copy prompt" button on errors in the HTML report, trace viewer and UI mode. Click to copy a pre-filled LLM prompt that contains the error message and useful context for fixing the error.'}),"\n",(0,i.jsx)("img",{src:"https://github.com/user-attachments/assets/f3654407-dd6d-4240-9845-0d96df2bf30a",alt:"Copy prompt",width:"2178",height:"1592"}),"\n",(0,i.jsx)(s.h3,{id:"filter-visible-elements",children:"Filter visible elements"}),"\n",(0,i.jsxs)(s.p,{children:["New option ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-filter-option-visible",children:"visible"})," for ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-filter",children:"locator.filter()"})," allows matching only visible elements."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="example.spec.ts"',children:"test('some test', async ({ page }) => {\n  // Ignore invisible todo items.\n  const todoItems = page.getByTestId('todo-item').filter({ visible: true });\n  // Check there are exactly 3 visible ones.\n  await expect(todoItems).toHaveCount(3);\n});\n"})}),"\n",(0,i.jsx)(s.h3,{id:"git-information-in-html-report",children:"Git information in HTML report"}),"\n",(0,i.jsxs)(s.p,{children:["Set option ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-capture-git-info",children:"testConfig.captureGitInfo"})," to capture git information into ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-metadata",children:"testConfig.metadata"}),"."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="playwright.config.ts"',children:"import { defineConfig } from '@playwright/test';\n\nexport default defineConfig({\n  captureGitInfo: { commit: true, diff: true }\n});\n"})}),"\n",(0,i.jsx)(s.p,{children:"HTML report will show this information when available:"}),"\n",(0,i.jsx)("img",{src:"https://github.com/user-attachments/assets/f5b3f6f4-aa08-4a24-816c-7edf33ef0c37",alt:"Git information in the report",width:"2514",height:"406"}),"\n",(0,i.jsx)(s.h3,{id:"test-step-improvements",children:"Test Step improvements"}),"\n",(0,i.jsxs)(s.p,{children:["A new ",(0,i.jsx)(s.a,{href:"/docs/api/class-teststepinfo",title:"TestStepInfo",children:"TestStepInfo"})," object is now available in test steps. You can add step attachments or skip the step under some conditions."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"test('some test', async ({ page, isMobile }) =>
1 {\n  // Note the new \"step\" argument:\n  await test.step('here is my step', async step => {\n    step.skip(isMobile, 'not relevant on mobile layouts');\n\n    // ...\n    await step.attach('my attachment', { body: 'some text' });\n    // ...\n  });\n});\n"})}),"\n",(0,i.jsx)(s.h3,{id:"miscellaneous-9",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.code,{children:"contrast"})," for methods ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-emulate-media",children:"page.emulateMedia()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-new-context",children:"browser.newContext()"})," allows to emulate the ",(0,i.jsx)(s.code,{children:"prefers-contrast"})," media feature."]}),"\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.a,{href:"/docs/api/class-apirequest#api-request-new-context-option-fail-on-status-code",children:"failOnStatusCode"})," makes all fetch requests made through the ",(0,i.jsx)(s.a,{href:"/docs/api/class-apirequestcontext",title:"APIRequestContext",children:"APIRequestContext"})," throw on response codes other than 2xx and 3xx."]}),"\n",(0,i.jsxs)(s.li,{children:["Assertion ",(0,i.jsx)(s.a,{href:"/docs/api/class-pageassertions#page-assertions-to-have-url",children:"expect(page).toHaveURL()"})," now supports a predicate."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-12",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 134.0.6998.35"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 135.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 18.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 133"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 133"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-150",children:"Version 1.50"}),"\n",(0,i.jsx)(s.h3,{id:"test-runner-4",children:"Test runner"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New option ",(0,i.jsx)(s.a,{href:"/docs/api/class-test#test-step-option-timeout",children:"timeout"})," allows specifying a maximum run time for an individual test step. A timed-out step will fail the execution of the test."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"test('some test', async ({ page }) => {\n  await test.step('a step', async () => {\n    // This step can time out separately from the test\n  }, { timeout: 1000 });\n});\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New method ",(0,i.jsx)(s.a,{href:"/docs/api/class-test#test-step-skip",children:"test.step.skip()"})," to disable execution of a test step."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"test('some test', async ({ page }) => {\n  await test.step('before running step', async () => {\n    // Normal step\n  });\n\n  await test.step.skip('not yet ready', async () => {\n    // This step is skipped\n  });\n\n  await test.step('after running step', async () => {\n    // This step still runs even though the previous one was skipped\n  });\n});\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Expanded ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-match-aria-snapshot-2",children:"expect(locator).toMatchAriaSnapshot()"})," to allow storing of aria snapshots in separate YAML files."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Added method ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-have-accessible-error-message",children:"expect(locator).toHaveAccessibleErrorMessage()"})," to assert the Locator points to an element with a given ",(0,i.jsx)(s.a,{href:"https://w3c.github.io/aria/#aria-errormessage",children:"aria errormessage"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Option ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-update-snapsh
1ots",children:"testConfig.updateSnapshots"})," added the configuration enum ",(0,i.jsx)(s.code,{children:"changed"}),". ",(0,i.jsx)(s.code,{children:"changed"})," updates only the snapshots that have changed, whereas ",(0,i.jsx)(s.code,{children:"all"})," now updates all snapshots, regardless of whether there are any differences."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New option ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-update-source-method",children:"testConfig.updateSourceMethod"})," defines the way source code is updated when ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-update-snapshots",children:"testConfig.updateSnapshots"})," is configured. Added ",(0,i.jsx)(s.code,{children:"overwrite"})," and ",(0,i.jsx)(s.code,{children:"3-way"})," modes that write the changes into source code, on top of existing ",(0,i.jsx)(s.code,{children:"patch"})," mode that creates a patch file."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"npx playwright test --update-snapshots=changed --update-source-method=3way\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Option ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-web-server",children:"testConfig.webServer"})," added a ",(0,i.jsx)(s.code,{children:"gracefulShutdown"})," field for specifying a process kill signal other than the default ",(0,i.jsx)(s.code,{children:"SIGKILL"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Exposed ",(0,i.jsx)(s.a,{href:"/docs/api/class-teststep#test-step-attachments",children:"testStep.attachments"})," from the reporter API to allow retrieval of all attachments created by that step."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New option ",(0,i.jsx)(s.code,{children:"pathTemplate"})," for ",(0,i.jsx)(s.code,{children:"toHaveScreenshot"})," and ",(0,i.jsx)(s.code,{children:"toMatchAriaSnapshot"})," assertions in the ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-expect",children:"testConfig.expect"})," configuration."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"ui-updates",children:"UI updates"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Updated default HTML reporter to improve display of attachments."}),"\n",(0,i.jsx)(s.li,{children:"New button in Codegen for picking elements to produce aria snapshots."}),"\n",(0,i.jsx)(s.li,{children:"Additional details (such as keys pressed) are now displayed alongside action API calls in traces."}),"\n",(0,i.jsxs)(s.li,{children:["Display of ",(0,i.jsx)(s.code,{children:"canvas"})," content in traces is error-prone. Display is now disabled by default, and can be enabled via the ",(0,i.jsx)(s.code,{children:"Display canvas content"})," UI setting."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"Call"})," and ",(0,i.jsx)(s.code,{children:"Network"})," panels now display additional time information."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"breaking",children:"Breaking"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-be-editable",children:"expect(locator).toBeEditable()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-is-editable",children:"locator.isEditable()"})," now throw if the target element is not ",(0,i.jsx)(s.code,{children:"<input>"}),", ",(0,i.jsx)(s.code,{children:"<select>"}),", or a number of other editable elements."]}),"\n",(0,i.jsxs)(s.li,{children:["Option ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-update-snapshots",children:"testConfig.updateSnapshots"})," now updates all snapshots when set to ",(0,i.jsx)(s.code,{children:"all"}),", rather than only the failed/changed snapshots. Use the new enum ",(0,i.jsx)(s.code,{children:"changed"})," to keep the old functionality of only updating the changed snapshots."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-13",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 133.0.6943.16"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 134.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 18.2"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 132"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 132"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-149",children:"Version 1.49"}),"\n",(0,i.jsx)(o.A,{id:"S5wCft-ImKk",title:"Playwright 1.49"}),"\n",(0,i.jsx)(s.h3,{id:"aria-snapshots",children:"Aria snapshots"}),"\n",(0,i.jsxs)(s.p,{children:["New assertion ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-match-aria-snapshot",children:"expect(locator).toMatchAriaSnapsh
1ot()"})," verifies page structure by comparing to an expected accessibility tree, represented as YAML."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:'await page.goto(\'https://playwright.dev\');\nawait expect(page.locator(\'body\')).toMatchAriaSnapshot(`\n  - banner:\n    - heading /Playwright enables reliable/ [level=1]\n    - link "Get started"\n    - link "Star microsoft/playwright on GitHub"\n  - main:\n    - img "Browsers (Chromium, Firefox, WebKit)"\n    - heading "Any browser \u2022 Any platform \u2022 One API"\n`);\n'})}),"\n",(0,i.jsxs)(s.p,{children:["You can generate this assertion with ",(0,i.jsx)(s.a,{href:"./codegen",children:"Test Generator"})," and update the expected snapshot with ",(0,i.jsx)(s.code,{children:"--update-snapshots"})," command line flag."]}),"\n",(0,i.jsxs)(s.p,{children:["Learn more in the ",(0,i.jsx)(s.a,{href:"./aria-snapshots",children:"aria snapshots guide"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"test-runner-5",children:"Test runner"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-tsconfig",children:"testConfig.tsconfig"})," allows to specify a single ",(0,i.jsx)(s.code,{children:"tsconfig"})," to be used for all tests."]}),"\n",(0,i.jsxs)(s.li,{children:["New method ",(0,i.jsx)(s.a,{href:"/docs/api/class-test#test-fail-only",children:"test.fail.only()"})," to focus on a failing test."]}),"\n",(0,i.jsxs)(s.li,{children:["Options ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-global-setup",children:"testConfig.globalSetup"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-global-teardown",children:"testConfig.globalTeardown"})," now support multiple setups/teardowns."]}),"\n",(0,i.jsxs)(s.li,{children:["New value ",(0,i.jsx)(s.code,{children:"'on-first-failure'"})," for ",(0,i.jsx)(s.a,{href:"/docs/api/class-testoptions#test-options-screenshot",children:"testOptions.screenshot"}),"."]}),"\n",(0,i.jsx)(s.li,{children:'Added "previous" and "next" buttons to the HTML report to quickly switch between test cases.'}),"\n",(0,i.jsxs)(s.li,{children:["New properties ",(0,i.jsx)(s.a,{href:"/docs/api/class-testinfoerror#test-info-error-cause",children:"testInfoError.cause"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-testerror#test-error-cause",children:"testError.cause"})," mirroring ",(0,i.jsx)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/cause",children:(0,i.jsx)(s.code,{children:"Error.cause"})}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.h3,{id:"breaking-chrome-and-msedge-channels-switch-to-new-headless-mode",children:["Breaking: ",(0,i.jsx)(s.code,{children:"chrome"})," and ",(0,i.jsx)(s.code,{children:"msedge"})," channels switch to new headless mode"]}),"\n",(0,i.jsxs)(s.p,{children:["This change affects you if you're using one of the following channels in your ",(0,i.jsx)(s.code,{children:"playwright.config.ts"}),":"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"chrome"}),", ",(0,i.jsx)(s.code,{children:"chrome-dev"}),", ",(0,i.jsx)(s.code,{children:"chrome-beta"}),", or ",(0,i.jsx)(s.code,{children:"chrome-canary"})]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"msedge"}),", ",(0,i.jsx)(s.code,{children:"msedge-dev"}),", ",(0,i.jsx)(s.code,{children:"msedge-beta"}),", or ",(0,i.jsx)(s.code,{children:"msedge-canary"})]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"what-do-i-need-to-do",children:"What do I need to do?"}),"\n",(0,i.jsxs)(s.p,{children:["After updating to Playwright v1.49, run your test suite. If it still passes, you're good to go. If not, you will probably need to update your snapshots, and adapt some of your test code around PDF viewers and extensions. See ",(0,i.jsx)(s.a,{href:"https://github.com/microsoft/playwright/issues/33566",children:"issue #33566"})," for more details."]}),"\n",(0,i.jsx)(s.h3,{id:"other-breaking-changes",children:"Other breaking changes"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"There will be no more updates for WebKit on Ubuntu 20.04 and Debian 11. We recommend updating your OS to a later version."}),"\n",(0,i.jsxs)(s.li,{children:["Package ",(0,i.jsx)(s.code,{children:"@playwright/experimental-ct-vue2"})," will no longer be updated."]}),"\n",(0,i.jsxs)(s.li,{children:["Package ",(0,i.jsx)(s.code,{children:"@playwright/experimental-ct-solid"})," will no longer be updated."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"try-new-chromium-headless",children:"Try new Chromium headless"}),"\n",(0,i.jsxs)(s.p,{children:["You can opt into the new headless mode by using ",(0,i.jsx)(s.code,{children:"'chromium'"})," channel. As ",(0,i.jsx)(s.a,{href:"https://developer.chrome.com/blog/chrome-headless-shell",children:"official Chrome documentation puts it"}),":"]}),"\n",(0,i.jsxs)(s.blockquote,{children:["\n",(0,i.jsx)(s.p,{children:"New Headless on the other hand is the real Chrome browser, and is thus more authentic, reliable, and offers more features. This makes it more suitable for high-accuracy end-to-e
1nd web app testing or browser extension testing."}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["See ",(0,i.jsx)(s.a,{href:"https://github.com/microsoft/playwright/issues/33566",children:"issue #33566"})," for the list of possible breakages you could encounter and more details on Chromium headless. Please file an issue if you see any problems after opting in."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"import { defineConfig, devices } from '@playwright/test';\n\nexport default defineConfig({\n  projects: [\n    {\n      name: 'chromium',\n      use: { ...devices['Desktop Chrome'], channel: 'chromium' },\n    },\n  ],\n});\n"})}),"\n",(0,i.jsx)(s.h3,{id:"miscellaneous-10",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"<canvas>"})," elements inside a snapshot now draw a preview."]}),"\n",(0,i.jsxs)(s.li,{children:["New method ",(0,i.jsx)(s.a,{href:"/docs/api/class-tracing#tracing-group",children:"tracing.group()"})," to visually group actions in the trace."]}),"\n",(0,i.jsx)(s.li,{children:"Playwright docker images switched from Node.js v20 to Node.js v22 LTS."}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-14",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 131.0.6778.33"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 132.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 18.2"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 130"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 130"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-148",children:"Version 1.48"}),"\n",(0,i.jsx)(o.A,{id:"VGlkSBkMVCQ",title:"Playwright 1.48"}),"\n",(0,i.jsx)(s.h3,{id:"websocket-routing",children:"WebSocket routing"}),"\n",(0,i.jsxs)(s.p,{children:["New methods ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-route-web-socket",children:"page.routeWebSocket()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-route-web-socket",children:"browserContext.routeWebSocket()"})," allow to intercept, modify and mock WebSocket connections initiated in the page. Below is a simple example that mocks WebSocket communication by responding to a ",(0,i.jsx)(s.code,{children:'"request"'})," with a ",(0,i.jsx)(s.code,{children:'"response"'}),"."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.routeWebSocket('/ws', ws => {\n  ws.onMessage(message => {\n    if (message === 'request')\n      ws.send('response');\n  });\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["See ",(0,i.jsx)(s.a,{href:"/docs/api/class-websocketroute",title:"WebSocketRoute",children:"WebSocketRoute"})," for more details."]}),"\n",(0,i.jsx)(s.h3,{id:"ui-updates-1",children:"UI updates"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:'New "copy" buttons for annotations and test location in the HTML report.'}),"\n",(0,i.jsxs)(s.li,{children:["Route method calls like ",(0,i.jsx)(s.a,{href:"/docs/api/class-route#route-fulfill",children:"route.fulfill()"})," are not shown in the report and trace viewer anymore. You can see which network requests were routed in the network tab instead."]}),"\n",(0,i.jsx)(s.li,{children:'New "Copy as cURL" and "Copy as fetch" buttons for requests in the network tab.'}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"miscellaneous-11",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Option ",(0,i.jsx)(s.a,{href:"/docs/api/class-apirequestcontext#api-request-context-fetch-option-form",children:"form"})," and similar ones now accept ",(0,i.jsx)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/FormData",children:"FormData"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["New method ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-request-gc",children:"page.requestGC()"})," may help detect memory leaks."]}),"\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.a,{href:"/docs/api/class-test#test-step-option-location",children:"location"})," to pass custom step location."]}),"\n",(0,i.jsxs)(s.li,{children:["Requests made by ",(0,i.jsx)(s.a,{href:"/docs/api/class-apirequestcontext",title:"APIRequestContext",children:"APIRequestContext"})," now record detailed timing and security information in the HAR."]}),"\n"]}
1),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-15",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 130.0.6723.19"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 130.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 18.0"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 129"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 129"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-147",children:"Version 1.47"}),"\n",(0,i.jsx)(s.h3,{id:"network-tab-improvements",children:"Network Tab improvements"}),"\n",(0,i.jsx)(s.p,{children:"The Network tab in the UI mode and trace viewer has several nice improvements:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"filtering by asset type and URL"}),"\n",(0,i.jsx)(s.li,{children:"better display of query string parameters"}),"\n",(0,i.jsx)(s.li,{children:"preview of font assets"}),"\n"]}),"\n",(0,i.jsx)("img",{src:"https://github.com/user-attachments/assets/4bd1b67d-90bd-438b-a227-00b9e86872e2",alt:"Network tab now has filters",width:"1712",height:"418"}),"\n",(0,i.jsxs)(s.h3,{id:"--tsconfig-cli-option",children:[(0,i.jsx)(s.code,{children:"--tsconfig"})," CLI option"]}),"\n",(0,i.jsx)(s.p,{children:"By default, Playwright will look up the closest tsconfig for each imported file using a heuristic. You can now specify a single tsconfig file in the command line, and Playwright will use it for all imported files, not only test files:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-sh",children:"# Pass a specific tsconfig\nnpx playwright test --tsconfig tsconfig.test.json\n"})}),"\n",(0,i.jsxs)(s.h3,{id:"apirequestcontext-now-accepts-urlsearchparams-and-string-as-query-parameters",children:[(0,i.jsx)(s.a,{href:"/docs/api/class-apirequestcontext",title:"APIRequestContext",children:"APIRequestContext"})," now accepts ",(0,i.jsx)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams",children:(0,i.jsx)(s.code,{children:"URLSearchParams"})})," and ",(0,i.jsx)(s.code,{children:"string"})," as query parameters"]}),"\n",(0,i.jsxs)(s.p,{children:["You can now pass ",(0,i.jsx)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams",children:(0,i.jsx)(s.code,{children:"URLSearchParams"})})," and ",(0,i.jsx)(s.code,{children:"string"})," as query parameters to ",(0,i.jsx)(s.a,{href:"/docs/api/class-apirequestcontext",title:"APIRequestContext",children:"APIRequestContext"}),":"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"test('query params', async ({ request }) => {\n  const searchParams = new URLSearchParams();\n  searchParams.set('userId', 1);\n  const response = await request.get(\n      'https://jsonplaceholder.typicode.com/posts',\n      {\n        params: searchParams // or as a string: 'userId=1'\n      }\n  );\n  // ...\n});\n"})}),"\n",(0,i.jsx)(s.h3,{id:"miscellaneous-12",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["The ",(0,i.jsx)(s.code,{children:"mcr.microsoft.com/playwright:v1.47.0"})," now serves a Playwright image based on Ubuntu 24.04 Noble. To use the 22.04 jammy-based image, please use ",(0,i.jsx)(s.code,{children:"mcr.microsoft.com/playwright:v1.47.0-jammy"})," instead."]}),"\n",(0,i.jsxs)(s.li,{children:["New options ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-remove-all-listeners-option-behavior",children:"behavior"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-remove-all-listeners-option-behavior",children:"behavior"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-remove-all-listeners-option-behavior",children:"behavior"})," to wait for ongoing listeners to complete."]}),"\n",(0,i.jsxs)(s.li,{children:["TLS client certificates can now be passed from memory by passing ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-new-context-option-client-certificates",children:"clientCertificates.cert"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-new-context-option-client-certificates",children:"clientCertificates.key"})," as buffers instead of file paths."]}),"\n",(0,i.jsxs)(s.li,{children:["Attachments with a ",(0,i.jsx)(s.code,{children:"text/html"})," content type can now be opened in a new tab in the HTML report. This is useful for including third-party reports or other HTML content in the Playwright test report and distributing it to your team."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-select-option-option-no-wait-after",children:"noWaitAfter"})," option in ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-select-option",children:"locator.selectOption()"})," was deprecated."]}),"\n",(0,i.jsxs)(s.li,{children:["We've seen reports of WebGL in Webkit misbehaving on GitHub Actions ",(0,i.jsx)(s.code,{children:"macos-13"}),". We recommend upgrading GitHub Actions to ",(0,i.jsx)(s.code,{children:"macos-14"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-16",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 129.0.6668.29"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 130.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 18.0"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 128"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 128"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-146",children:"Version 1.46"}),"\n",(0,i.jsx)(o.A,{id:"tQo7w-QQBsI",title:"Playwright 1.46"}),"\n",(0,i.jsx)(s.h3,{id:"tls-client-certificates",children:"TLS Client Certificates"}),"\n",(0,i.jsx)(s.p,{children:"Playwright now allows you to supply client-side certificates, so that server can verify them, as specified by TLS Client Authentication."}),"\n",(0,i.jsxs)(s.p,{children:["The following snippet sets up a client certificate for ",(0,i.jsx)(s.code,{children:"https://example.com"}),":"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"import { defineConfig } from '@playwright/test';
1\n\nexport default defineConfig({\n  // ...\n  use: {\n    clientCertificates: [{\n      origin: 'https://example.com',\n      certPath: './cert.pem',\n      keyPath: './key.pem',\n      passphrase: 'mysecretpassword',\n    }],\n  },\n  // ...\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["You can also provide client certificates to a particular ",(0,i.jsx)(s.a,{href:"./api/class-testproject#test-project-use",children:"test project"})," or as a parameter of ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-new-context",children:"browser.newContext()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-apirequest#api-request-new-context",children:"apiRequest.newContext()"}),"."]}),"\n",(0,i.jsxs)(s.h3,{id:"--only-changed-cli-option",children:[(0,i.jsx)(s.code,{children:"--only-changed"})," cli option"]}),"\n",(0,i.jsxs)(s.p,{children:["New CLI option ",(0,i.jsx)(s.code,{children:"--only-changed"}),' will only run test files that have been changed since the last git commit or from a specific git "ref". This will also run all test files that import any changed files.']}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-sh",children:'# Only run test files with uncommitted changes\nnpx playwright test --only-changed\n\n# Only run test files changed relative to the "main" branch\nnpx playwright test --only-changed=main\n'})}),"\n",(0,i.jsxs)(s.h3,{id:"component-testing-new-router-fixture",children:["Component Testing: New ",(0,i.jsx)(s.code,{children:"router"})," fixture"]}),"\n",(0,i.jsxs)(s.p,{children:["This release introduces an experimental ",(0,i.jsx)(s.code,{children:"router"})," fixture to intercept and handle network requests in component testing. There are two ways to use the router fixture:"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Call ",(0,i.jsx)(s.code,{children:"router.route(url, handler)"})," that behaves similarly to ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-route",children:"page.route()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["Call ",(0,i.jsx)(s.code,{children:"router.use(handlers)"})," and pass ",(0,i.jsx)(s.a,{href:"https://mswjs.io",children:"MSW library"})," request handlers to it."]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"Here is an example of reusing your existing MSW handlers in the test."}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"import { handlers } from '@src/mocks/handlers';\n\ntest.beforeEach(async ({ router }) => {\n  // install common handlers before each test\n  await router.use(...handlers);\n});\n\ntest('example test', async ({ mount }) => {\n  // test as usual, your handlers are active\n  // ...\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["This fixture is only available in ",(0,i.jsx)(s.a,{href:"./test-components#handling-network-requests",children:"component tests"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"ui-mode--trace-viewer-updates",children:"UI Mode / Trace Viewer Updates"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Test annotations are now shown in UI mode."}),"\n",(0,i.jsx)(s.li,{children:"Content of text attachments is now rendered inline in the attachments pane."}),"\n",(0,i.jsxs)(s.li,{children:["New setting to show/hide routing actions like ",(0,i.jsx)(s.a,{href:"/docs/api/class-route#route-continue",children:"route.continue()"}),"."]}),"\n",(0,i.jsx)(s.li,{children:"Request method and status are shown in the network details tab."}),"\n",(0,i.jsx)(s.li,{children:"New button to copy source file location to clipboard."}),"\n",(0,i.jsxs)(s.li,{children:["Metadata pane now displays the ",(0,i.jsx)(s.code,{children:"baseURL"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"miscellaneous-13",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New ",(0,i.jsx)(s.code,{children:"maxRetries"})," option in ",(0,i.jsx)(s.a,{href:"/docs/api/class-apirequestcontext#api-request-context-fetch",children:"apiRequestContext.fetch()"})," which retries on the ",(0,i.jsx)(s.code,{children:"ECONNRESET"})," network error."]}),"\n",(0,i.jsxs)(s.li,{children:["New option to ",(0,i.jsx)(s.a,{href:"./test-fixtures#box-fixtures",children:"box a fixture"})," to minimize the fixture exposure in test reports and error messages."]}),"\n",(0,i.jsxs)(s.li,{children:["New option to provide a ",(0,i.jsx)(s.a,{href:"./test-fixtures#custom-fixture-title",children:"custom fixture title"})," to be used in test reports and error messages."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-17",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 128.0.6613.18"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 128.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 18.0"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 127"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 127"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-145",children:"Version 1.45"}),"\n",(0,i.jsx)(o.A,{id:"54_aC-rVKHg",title:"Playwright 1.45"}),"\n",(0,i.jsx)(s.h3,{id:"clock",children:"Clock"}),"\n",(0,i.jsxs)(s.p,{children:["Utilizing the new ",(0,i.jsx)(s.a,{href:"/docs/api/class-clock",title:"Clock",children:"Clock"})," API allows to manipulate and control time within tests to verify time-related behavior. This API covers many common sce
1narios, including:"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"testing with predefined time;"}),"\n",(0,i.jsx)(s.li,{children:"keeping consistent time and timers;"}),"\n",(0,i.jsx)(s.li,{children:"monitoring inactivity;"}),"\n",(0,i.jsx)(s.li,{children:"ticking through time manually."}),"\n"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// Initialize clock and let the page load naturally.\nawait page.clock.install({ time: new Date('2024-02-02T08:00:00') });\nawait page.goto('http://localhost:3333');\n\n// Pretend that the user closed the laptop lid and opened it again at 10am,\n// Pause the time once reached that point.\nawait page.clock.pauseAt(new Date('2024-02-02T10:00:00'));\n\n// Assert the page state.\nawait expect(page.getByTestId('current-time')).toHaveText('2/2/2024, 10:00:00 AM');\n\n// Close the laptop lid again and open it at 10:30am.\nawait page.clock.fastForward('30:00');\nawait expect(page.getByTestId('current-time')).toHaveText('2/2/2024, 10:30:00 AM');\n"})}),"\n",(0,i.jsxs)(s.p,{children:["See ",(0,i.jsx)(s.a,{href:"/docs/clock",children:"the clock guide"})," for more details."]}),"\n",(0,i.jsx)(s.h3,{id:"test-runner-6",children:"Test runner"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New CLI option ",(0,i.jsx)(s.code,{children:"--fail-on-flaky-tests"})," that sets exit code to ",(0,i.jsx)(s.code,{children:"1"})," upon any flaky tests. Note that by default, the test runner exits with code ",(0,i.jsx)(s.code,{children:"0"})," when all failed tests recovered upon a retry. With this option, the test run will fail in such case."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New environment variable ",(0,i.jsx)(s.code,{children:"PLAYWRIGHT_FORCE_TTY"})," controls whether built-in ",(0,i.jsx)(s.code,{children:"list"}),", ",(0,i.jsx)(s.code,{children:"line"})," and ",(0,i.jsx)(s.code,{children:"dot"})," reporters assume a live terminal. For example, this could be useful to disable tty behavior when your CI environment does not handle ANSI control sequences well. Alternatively, you can enable tty behavior even when to live terminal is present, if you plan to post-process the output and handle control sequences."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-sh",children:"# Avoid TTY features that output ANSI control sequences\nPLAYWRIGHT_FORCE_TTY=0 npx playwright test\n\n# Enable TTY features, assuming a terminal width 80\nPLAYWRIGHT_FORCE_TTY=80 npx playwright test\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New options ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-respect-git-ignore",children:"testConfig.respectGitIgnore"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-testproject#test-project-respect-git-ignore",children:"testProject.respectGitIgnore"})," control whether files matching ",(0,i.jsx)(s.code,{children:".gitignore"})," patterns are excluded when searching for tests."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New property ",(0,i.jsx)(s.code,{children:"timeout"})," is now available for custom expect matchers. This property takes into account ",(0,i.jsx)(s.code,{children:"playwright.config.ts"})," and ",(0,i.jsx)(s.code,{children:"expect.configure()"}),"."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"import { expect as baseExpect } from '@playwright/test';\n\nexport const expect = baseExpect.extend({\n  async toHaveAmount(locator: Locator, expected: number, options?: { timeout?: number }) {\n    // When no timeout option is specified, use the config timeout.\n    const timeout = options?.timeout ?? this.timeout;\n    // ... implement the assertion ...\n  },\n});\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"miscellaneous-14",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Method ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-set-input-files",children:"locator.setInputFiles()"})," now supports uploading a directory for ",(0,i.jsx)(s.code,{children:"<input type=file webkitdirectory>"})," elements."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.getByLabel('Upload directory').setInputFiles(path.join(__dirname, 'mydir'));\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Multiple methods like ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-click",children:"locator.click()"})," or ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-press",children:"locator.press()"})," now support a ",(0,i.jsx)(s.code,{children:"ControlOrMeta"})," modifier key. This key maps to ",(0,i.jsx)(s.code,{children:"Meta"})," on macOS and maps to ",(0,i.jsx)(s.code,{children:"Control"})," on Windows and Linux."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// Press the common keyboard shortcut Control+S or Meta+S to trigger a \"Save\" operation.\nawait page.keyboard.press('ControlOrMeta+S');\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New property ",(0,i.jsx)(s.code,{children:"httpCredentials.send"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-apirequest#api-request-new-context",children:"apiRequest.newContext()"})," that allows to either always send the ",(0,i.jsx)(s.code,{children:"Authorization"})," header or only send it in response to ",(0,i.jsx)(s.code,{children:"401 Unauthorized"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New option ",(0,i.jsx)(s.code,{children:"reason"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-apirequestcontext#api-request-context-dispose",children:"apiRequestContext.dispose()"})," that will be included in the error message of ongoing operations interrupted by the context disposal."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New option ",(0,i.jsx)(s.code,{children:"host"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsertype#browser-type-launch-server",children:"browserType.launchServer()"})," allows to accept websocket connections on a specific address instead of unspecified ",(0,i.jsx)(s.code,{children:"0.0.0.0"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:"Playwright now supports Chromium, Firefox and WebKit on Ubuntu 24.04."}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:"v1.45 is the last release to receive WebKit update for macOS 12 Monterey. Please update macOS to keep using the latest WebKit."}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-18",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 127.0.6533.5"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 127.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 17.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 126"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 126"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-144",children:"Version 1.44"}),"\n",(0,i.jsx)(o.A,{id:"avjSahFWdCI",title:"Playwright 1.44"}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-8",children:"New APIs"}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Accessibility assertions"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-have-accessible-name",children:"expect(locator).toHaveAcce
1ssibleName()"})," checks if the element has the specified accessible name:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const locator = page.getByRole('button');\nawait expect(locator).toHaveAccessibleName('Submit');\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-have-accessible-description",children:"expect(locator).toHaveAccessibleDescription()"})," checks if the element has the specified accessible description:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const locator = page.getByRole('button');\nawait expect(locator).toHaveAccessibleDescription('Upload a photo');\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-have-role",children:"expect(locator).toHaveRole()"})," checks if the element has the specified ARIA role:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const locator = page.getByTestId('save-button');\nawait expect(locator).toHaveRole('button');\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Locator handler"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["After executing the handler added with ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-add-locator-handler",children:"page.addLocatorHandler()"}),", Playwright will now wait until the overlay that triggered the handler is not visible anymore. You can opt-out of this behavior with the new ",(0,i.jsx)(s.code,{children:"noWaitAfter"})," option."]}),"\n",(0,i.jsxs)(s.li,{children:["You can use new ",(0,i.jsx)(s.code,{children:"times"})," option in ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-add-locator-handler",children:"page.addLocatorHandler()"})," to specify maximum number of times the handler should be run."]}),"\n",(0,i.jsxs)(s.li,{children:["The handler in ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-add-locator-handler",children:"page.addLocatorHandler()"})," now accepts the locator as argument."]}),"\n",(0,i.jsxs)(s.li,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-remove-locator-handler",children:"page.removeLocatorHandler()"})," method for removing previously added locator handlers."]}),"\n"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const locator = page.getByText('This interstitial covers the button');\nawait page.addLocatorHandler(locator, async overlay => {\n  await overlay.locator('#close').click();\n}, { times: 3, noWaitAfter: true });\n// Run your tests that can be interrupted by the overlay.\n// ...\nawait page.removeLocatorHandler(locator);\n"})}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Miscellaneous options"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"./api/class-apirequestcontext#api-request-context-fetch-option-multipart",children:(0,i.jsx)(s.code,{children:"multipart"})})," option in ",(0,i.jsx)(s.code,{children:"apiRequestContext.fetch()"})," now accepts ",(0,i.jsx)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/FormData",children:(0,i.jsx)(s.code,{children:"FormData"})})," and supports repeating fields with the same name."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const formData = new FormData();\nformData.append('file', new File(['let x = 2024;'], 'f1.js', { type: 'text/javascript' }));\nformData.append('file', new File(['hello'], 'f2.txt', { type: 'text/plain' }));\ncontext.request.post('https://example.com/uploadFiles', {\n  multipart: formData\n});\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"expect(callback).toPass({ intervals })"})," can now be configured by ",(0,i.jsx)(s.code,{children:"expect.toPass.intervals"})," option globally in ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-expect",children:"testConfig.expect"})," or per project in ",(0,i.jsx)(s.a,{href:"/docs/api/class-testproject#test-project-expect",children:"testProject.expect"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"expect(page).toHaveURL(url)"})," now supports ",(0,i.jsx)(s.code,{children:"ignoreCase"})," ",(0,i.jsx)(s.a,{href:"./api/class-pageassertions#page-assertions-to-have-url-option-ignore-case",children:"option"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"./api/class-testproject#test-project-ignore-snapsh
1ots",children:"testProject.ignoreSnapshots"})," allows to configure  per project whether to skip screenshot expectations."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Reporter API"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New method ",(0,i.jsx)(s.a,{href:"/docs/api/class-suite#suite-entries",children:"suite.entries()"})," returns child test suites and test cases in their declaration order. ",(0,i.jsx)(s.a,{href:"/docs/api/class-suite#suite-type",children:"suite.type"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-testcase#test-case-type",children:"testCase.type"})," can be used to tell apart test cases and suites in the list."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"./test-reporters#blob-reporter",children:"Blob"})," reporter now allows overriding report file path with a single option ",(0,i.jsx)(s.code,{children:"outputFile"}),". The same option can also be specified as ",(0,i.jsx)(s.code,{children:"PLAYWRIGHT_BLOB_OUTPUT_FILE"})," environment variable that might be more convenient on CI/CD."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"./test-reporters#junit-reporter",children:"JUnit"})," reporter now supports ",(0,i.jsx)(s.code,{children:"includeProjectInTestName"})," option."]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Command line"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"--last-failed"})," CLI option to for running only tests that failed in the previous run."]}),"\n",(0,i.jsx)(s.p,{children:"First run all tests:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-sh",children:"$ npx playwright test\n\nRunning 103 tests using 5 workers\n...\n2 failed\n  [chromium] \u203A my-test.spec.ts:8:5 \u203A two \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n  [chromium] \u203A my-test.spec.ts:13:5 \u203A three \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n101 passed (30.0s)\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Now fix the failing tests and run Playwright again with ",(0,i.jsx)(s.code,{children:"--last-failed"})," option:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-sh",children:"$ npx playwright test --last-failed\n\nRunning 2 tests using 2 workers\n  2 passed (1.2s)\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-19",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 125.0.6422.14"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 125.0.1"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 17.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 124"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 124"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-143",children:"Version 1.43"}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-9",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Method ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-clear-cookies",children:"browserContext.clearCookies()"})," now supports filters to remove only some cookies."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// Clear all cookies.\nawait context.clearCookies();\n// New: clear cookies with a particular name.\nawait context.clearCookies({ name: 'session-id' });\n// New: clear cookies for a particular domain.\nawait context.clearCookies({ domain: 'my-origin.com' });\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New mode ",(0,i.jsx)(s.code,{children:"retain-on-first-failure"})," for ",(0,i.jsx)(s.a,{href:"/docs/api/class-testoptions#test-options-trace",children:"testOptions.trace"}),". In this mode, trace is recorded for the first run of each test, but not for retires. When test run fails, the trace file is retained, otherwise it is removed."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"import { defineConfig } from '@playwright/test';
1\n\nexport default defineConfig({\n  use: {\n    trace: 'retain-on-first-failure',\n  },\n});\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New property ",(0,i.jsx)(s.a,{href:"/docs/api/class-testinfo#test-info-tags",children:"testInfo.tags"})," exposes test tags during test execution."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"test('example', async ({ page }) => {\n  console.log(test.info().tags);\n});\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New method ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-content-frame",children:"locator.contentFrame()"})," converts a ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator",title:"Locator",children:"Locator"})," object to a ",(0,i.jsx)(s.a,{href:"/docs/api/class-framelocator",title:"FrameLocator",children:"FrameLocator"}),". This can be useful when you have a ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator",title:"Locator",children:"Locator"})," object obtained somewhere, and later on would like to interact with the content inside the frame."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const locator = page.locator('iframe[name=\"embedded\"]');\n// ...\nconst frameLocator = locator.contentFrame();\nawait frameLocator.getByRole('button').click();\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New method ",(0,i.jsx)(s.a,{href:"/docs/api/class-framelocator#frame-locator-owner",children:"frameLocator.owner()"})," converts a ",(0,i.jsx)(s.a,{href:"/docs/api/class-framelocator",title:"FrameLocator",children:"FrameLocator"})," object to a ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator",title:"Locator",children:"Locator"}),". This can be useful when you have a ",(0,i.jsx)(s.a,{href:"/docs/api/class-framelocator",title:"FrameLocator",children:"FrameLocator"})," object obtained somewhere, and later on would like to interact with the ",(0,i.jsx)(s.code,{children:"iframe"})," element."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const frameLocator = page.frameLocator('iframe[name=\"embedded\"]');\n// ...\nconst locator = frameLocator.owner();\nawait expect(locator).toBeVisible();\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"ui-mode-updates",children:"UI Mode Updates"}),"\n",(0,i.jsx)("img",{src:"https://github.com/microsoft/playwright/assets/9881434/61ca7cfc-eb7a-4305-8b62-b6c9f098f300",alt:"Playwright UI Mode",width:"2304",height:"1492"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"See tags in the test list."}),"\n",(0,i.jsxs)(s.li,{children:["Filter by tags by typing ",(0,i.jsx)(s.code,{children:"@fast"})," or clicking on the tag itself."]}),"\n",(0,i.jsxs)(s.li,{children:["New shortcuts:","\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:'"F5" to run tests.'}),"\n",(0,i.jsx)(s.li,{children:'"Shift F5" to stop running tests.'}),"\n",(0,i.jsx)(s.li,{children:'"Ctrl `" to toggle test output.'}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-20",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 124.0.6367.8"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 124.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 17.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 123"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 123"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-142",children:"Version 1.42"}),"\n",(0,i.jsx)(o.A,{id:"KjSaIQLlgns",title:"Playwright 1.41 & 1.42"}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-10",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New method ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-add-locator-handler",children:"page.addLocatorHandler()"})," registers a callback that will be invoked when specified element becomes visible and may block Playwright actions. The callback can get rid of the overlay. Here is an example that closes a cookie dialog when it appears:"]}),"\n"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// Setup the handler.\nawait page.addLocatorHandler(\n    page.getByRole('heading', { name: 'Hej! You are in control of your cookies.' }),\n    async () => {\n      await page.getByRole('button', { name: 'Accept all' }).click();\n    });\n// Write the test as usual.\nawait page.goto('https://www.ikea.com/');\nawait page.getByRole('link', { name: 'Collection of blue and white' }).click();\nawait expect(page.getByRole('heading', { name: 'Light and easy' })).toBeVisible();\n"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"expect(callback).toPass()"})," timeout can now be configured by ",(0,i.jsx)(s.code,{children:"expect.toPass.timeout"})," option ",(0,i.jsx)(s.a,{href:"./api/class-testconfig#test-config-expect",children:"globally"})," or in ",(0,i.jsx)(s.a,{href:"./api/class-testproject#test-project-expect",children:"project config"})]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-electronapplication#electron-application-event-console",children:"electronApplication.on('console')"}
1)," event is emitted when Electron main process calls console API methods."]}),"\n"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"electronApp.on('console', async msg => {\n  const values = [];\n  for (const arg of msg.args())\n    values.push(await arg.jsonValue());\n  console.log(...values);\n});\nawait electronApp.evaluate(() => console.log('hello', 5, { foo: 'bar' }));\n"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"./test-annotations#tag-tests",children:"New syntax"})," for adding tags to the tests (@-tokens in the test title are still supported):"]}),"\n"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"test('test customer login', {\n  tag: ['@fast', '@login'],\n}, async ({ page }) => {\n  // ...\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Use ",(0,i.jsx)(s.code,{children:"--grep"})," command line option to run only tests with certain tags."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-sh",children:"npx playwright test --grep @fast\n"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"--project"})," command line ",(0,i.jsx)(s.a,{href:"./test-cli#all-options",children:"flag"})," now supports '*' wildcard:"]}),"\n"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-sh",children:"npx playwright test --project='*mobile*'\n"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"./test-annotations#annotate-tests",children:"New syntax"})," for test annotations:"]}),"\n"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"test('test full report', {\n  annotation: [\n    { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/23180' },\n    { type: 'docs', description: 'https://playwright.dev/docs/test-annotations#tag-tests' },\n  ],\n}, async ({ page }) => {\n  // ...\n});\n"})}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-pdf",children:"page.pdf()"})," accepts two new options ",(0,i.jsx)(s.a,{href:"./api/class-page#page-pdf-option-tagged",children:(0,i.jsx)(s.code,{children:"tagged"})})," and ",(0,i.jsx)(s.a,{href:"./api/class-page#page-pdf-option-outline",children:(0,i.jsx)(s.code,{children:"outline"})}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"announcements-2",children:"Announcements"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"\u26A0\uFE0F Ubuntu 18 is not supported anymore."}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-21",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 123.0.6312.4"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 123.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 17.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 122"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 123"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-141",children:"Version 1.41"}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-11",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New method ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-unroute-all",children:"page.unrouteAll()"})," removes all routes registered by ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-route",children:"page.route()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-route-from-har",children:"page.routeFromHAR()"}),". Optionally allows to wait for ongoing routes to finish, or ignore any errors from them."]}),"\n",(0,i.jsxs)(s.li,{children:["New method ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-unroute-all",children:"browserContext.unrouteAll()"})," removes all routes registered by ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-route",children:"browserContext.route()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-route-from-har",children:"browserContext.routeFromHAR()"}),". Optionally allows to wait for ongoing routes to finish, or ignore any errors from them."]}),"\n",(0,i.jsxs)(s.li,{children:["New options ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-screenshot-option-style",children:"style"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-screenshot",children:"page.screenshot()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-screenshot-option-style",children:"style"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-screenshot",children:"locator.screenshot()"})," to add custom CSS to the page before taking a screenshot."]}),"\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.code,{children:"stylePath"})," for methods ",(0,i.jsx)(s.a,{href:"/docs/api/class-pageassertions#page-assertions-to-have-screenshot-1",children:"expect(page).toHaveScreenshot()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-have-screenshot-1",children:"expect(locator).toHaveScreenshot()"})," to apply a custom stylesheet while making the screenshot."]}),"\n",(0,i.jsxs)(s.li,{children:["New ",(0,i.jsx)(s.code,{children:"fileName"})," option for ",(0,i.jsx)(s.a,{href:"./test-reporters#blob-reporter",children:"Blob reporter"}),", to specify the name of the report to be created."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-22",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 121.0.6167.57"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 121.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 17.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 120"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 120"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-140",children:"Version 1.40"}),"\n",(0,i.jsx)(o.A,{id:"mn892dV81_8",title:"Playwright 1.40"}),"\n",(0,i.jsx)(s.h3,{id:"test-generator-update",children:"Test Generator Update"}),"\n",(0,i.jsx)("img",{src:"https://github.com/microsoft/playwright/assets/9881434/e8d67e2e-f36d-4301-8631-023948d3e190",alt:"Playwright Test Generator",width:"2788",height:"1824"}),"\n",(0,i.jsx)(s.p,{children:"New tools to generate assertions:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:['"Assert visibility" tool generates ',(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-be-visible",children:"expect(locator).toBeVisible()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:['"Assert value" tool generates ',(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-have-value",children:"expect(locator).toHaveValue()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:['"Assert text" tool generates ',(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-contain-text",children:"expect(locator).toContainText()"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"Here is an example of a generated test with assertions:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"import { test, expect } from '@playwright/test';\n\ntest('test', async ({ page }) =>
1 {\n  await page.goto('https://playwright.dev/');\n  await page.getByRole('link', { name: 'Get started' }).click();\n  await expect(page.getByLabel('Breadcrumbs').getByRole('list')).toContainText('Installation');\n  await expect(page.getByLabel('Search')).toBeVisible();\n  await page.getByLabel('Search').click();\n  await page.getByPlaceholder('Search docs').fill('locator');\n  await expect(page.getByPlaceholder('Search docs')).toHaveValue('locator');\n});\n"})}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-12",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Options ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-close-option-reason",children:"reason"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-close",children:"page.close()"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-close-option-reason",children:"reason"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-close",children:"browserContext.close()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-close-option-reason",children:"reason"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-close",children:"browser.close()"}),". Close reason is reported for all operations interrupted by the closure."]}),"\n",(0,i.jsxs)(s.li,{children:["Option ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsertype#browser-type-launch-persistent-context-option-firefox-user-prefs",children:"firefoxUserPrefs"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsertype#browser-type-launch-persistent-context",children:"browserType.launchPersistentContext()"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"other-changes",children:"Other Changes"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Methods ",(0,i.jsx)(s.a,{href:"/docs/api/class-download#download-path",children:"download.path()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-download#download-create-read-stream",children:"download.createReadStream()"})," throw an error for failed and cancelled downloads."]}),"\n",(0,i.jsxs)(s.li,{children:["Playwright ",(0,i.jsx)(s.a,{href:"/docs/docker",children:"docker image"})," now comes with Node.js v20."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-23",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 120.0.6099.28"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 119.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 17.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 119"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 119"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-139",children:"Version 1.39"}),"\n",(0,i.jsx)(o.A,{id:"KqVuRAlOkm0",title:"Playwright 1.39"}),"\n",(0,i.jsx)(s.h3,{id:"add-custom-matchers-to-your-expect",children:"Add custom matchers to your expect"}),"\n",(0,i.jsx)(s.p,{children:"You can extend Playwright assertions by providing custom matchers. These matchers will be available on the expect object."}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="test.spec.ts"',children:"import { expect as baseExpect } from '@playwright/test';\nexport const expect = baseExpect.extend({\n  async toHaveAmount(locator: Locator, expected: number, options?: { timeout?: number }) {\n    // ... see documentation for how to write matchers.\n  },\n});\n\ntest('pass', async ({ page }) => {\n  await expect(page.getByTestId('cart')).toHaveAmount(5);\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["See the documentation ",(0,i.jsx)(s.a,{href:"./test-assertions#add-custom-matchers-using-expectextend",children:"for a full example"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"merge-test-fixtures",children:"Merge test fixtures"}),"\n",(0,i.jsx)(s.p,{children:"You can now merge test fixtures from multiple files or modules:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="fixtures.ts"',children:"import { mergeTests } from '@playwright/test';\nimport { test as dbTest } from 'database-test-utils';\nimport { test as a11yTest } from 'a11y-test-utils';\n\nexport const test = mergeTests(dbTest, a11yTest);\n"})}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="test.spec.ts"',children:"import { test } from './fixtures';\n\ntest('passes', async ({ database, page, a11y }) =>
1 {\n  // use database and a11y fixtures.\n});\n"})}),"\n",(0,i.jsx)(s.h3,{id:"merge-custom-expect-matchers",children:"Merge custom expect matchers"}),"\n",(0,i.jsx)(s.p,{children:"You can now merge custom expect matchers from multiple files or modules:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="fixtures.ts"',children:"import { mergeTests, mergeExpects } from '@playwright/test';\nimport { test as dbTest, expect as dbExpect } from 'database-test-utils';\nimport { test as a11yTest, expect as a11yExpect } from 'a11y-test-utils';\n\nexport const test = mergeTests(dbTest, a11yTest);\nexport const expect = mergeExpects(dbExpect, a11yExpect);\n"})}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="test.spec.ts"',children:"import { test, expect } from './fixtures';\n\ntest('passes', async ({ page, database }) => {\n  await expect(database).toHaveDatabaseUser('admin');\n  await expect(page).toPassA11yAudit();\n});\n"})}),"\n",(0,i.jsx)(s.h3,{id:"hide-implementation-details-box-test-steps",children:"Hide implementation details: box test steps"}),"\n",(0,i.jsxs)(s.p,{children:["You can mark a ",(0,i.jsx)(s.a,{href:"/docs/api/class-test#test-step",children:"test.step()"}),' as "boxed" so that errors inside it point to the step call site.']}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"async function login(page) {\n  await test.step('login', async () => {\n    // ...\n  }, { box: true });  // Note the \"box\" option here.\n}\n"})}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-txt",children:"Error: Timed out 5000ms waiting for expect(locator).toBeVisible()\n  ... error details omitted ...\n\n  14 |   await page.goto('https://github.com/login');\n> 15 |   await login(page);\n     |         ^\n  16 | });\n"})}),"\n",(0,i.jsxs)(s.p,{children:["See ",(0,i.jsx)(s.a,{href:"/docs/api/class-test#test-step",children:"test.step()"})," documentation for a full example."]}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-13",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-have-attribute-2",children:"expect(locator).toHaveAttribute()"})}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-24",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 119.0.6045.9"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 118.0.1"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 17.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 118"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 118"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-138",children:"Version 1.38"}),"\n",(0,i.jsx)(o.A,{id:"YGJTeXaZDTM",title:"Playwright 1.38"}),"\n",(0,i.jsx)(s.h3,{id:"ui-mode-updates-1",children:"UI Mode Updates"}),"\n",(0,i.jsx)("img",{src:"https://github.com/microsoft/playwright/assets/746130/8ba27be0-58fd-4f62-8561-950480610369",alt:"Playwright UI Mode",width:"1230",height:"722"}),"\n",(0,i.jsxs)(s.ol,{children:["\n",(0,i.jsx)(s.li,{children:"Zoom into time range."}),"\n",(0,i.jsx)(s.li,{children:"Network panel redesign."}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-14",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-event-web-error",children:"browserContext.on('weberror')"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-press-sequentially",children:"locator.pressSequentially()"})}),"\n",(0,i.jsxs)(s.li,{children:["The ",(0,i.jsx)(s.a,{href:"/docs/api/class-reporter#reporter-on-end",children:"reporter.onEnd()"})," now reports ",(0,i.jsx)(s.code,{children:"startTime"})," and total run ",(0,i.jsx)(s.code,{children:"duration"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"deprecations",children:"Deprecations"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["The following methods were deprecated: ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-type",children:"page.type()"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-frame#frame-type",children:"frame.type()"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-type",children:"locator.type()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-elementhandle#element-handle-type",children:"elementHandle.type()"}),". Please use ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-fill",children:"locator.fill()"})," instead which is much faster. Use ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-press-sequentially",children:"locator.pressSequentially()"})," only if there is a special keyboard handling on the page, and you need to press keys one-by-one."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"breaking-changes-playwright-no-longer-downloads-browsers-automatically",children:"Breaking Changes: Playwright no longer downloads browsers automatically"}),"\n",(0,i.jsxs)(s.blockquote,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"Note"}),": If you are using ",(0,i.jsx)(s.code,{children:"@playwright/test"})," package, this change does not affect you."]}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["Playwright recommends to use ",(0,i.jsx)(s.code,{children:"@playwright/test"})," package and download browsers via ",(0,i.jsx)(s.code,{children:"npx playwright install"})," command. If you are following this recommendation, nothing has changed for you."]}),"\n",(0,i.jsxs)(s.p,{children:["However, up to v1.38, installing the ",(0,i.jsx)(s.code,{children:"playwright"})," package instead of ",(0,i.jsx)(s.code,{children:"@playwright/test"})," did automatically download browsers. This is no longer the case, and we recommend to explicitly download browsers via ",(0,i.jsx)(s.code,{children:"npx playwright install"})," command."]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"v1.37 and earlier"})}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"playwright"})," package was downloading browsers during ",(0,i.jsx)(s.code,{children:"npm install"}),", while ",(0,i.jsx)(s.code,{children:"@playwright/test"})," was not."]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"v1.38 and later"})}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"playwright"})," and ",(0,i.jsx)(s.code,{children:"@playwright/test"})," packages do not download browsers during ",(0,i.jsx)(s.code,{children:"npm install"}),"."]}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Recommended migration"})}),"\n",(0,i.jsxs)(s.p,{children:["Run ",(0,i.jsx)(s.code,{children:"npx playwright install"})," to download browsers after ",(0,i.jsx)(s.code,{children:"npm install"}),". For example, in your CI configuration:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-yml",children:"- run: npm ci\n- run: npx playwright install --with-deps\n"})}),"\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.strong,{children:"Alternative migration option - not recommended"})}),"\n",(0,i.jsxs)(s.p,{children:["Add ",(0,i.jsx)(s.code,{children:"@playwright/browser-chromium"}),", ",(0,i.jsx)(s.code,{children:"@playwright/browser-firefox"})," and ",(0,i.jsx)(s.code,{children:"@playwright/browser-webkit"})," as a dependency. These packages download respective browsers during ",(0,i.jsx)(s.code,{children:"npm install"}),". Make sure you keep the version of all playwright packages in sync:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-json",children:'// package.json\n{\n  "devDependencies": {\n    "playwright": "1.38.0",\n    "@playwright/browser-chromium": "1.38.0",\n    "@playwright/browser-firefox": "1.38.0",\n    "@playwright/browser-webkit": "1.38.0"\n  }\n}\n'})}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-25",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 117.0.5938.62"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 117.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 17.0"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 116"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 116"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-137",children:"Version 1.37"}),"\n",(0,i.jsx)(o.A,{id:"cEd4SH_Xf5U",title:"Playwright 1.36 & 1.37"}),"\n",(0,i.jsxs)(s.h3,{id:"new-npx-playwright-merge-reports-tool",children:["New ",(0,i.jsx)(s.code,{children:"npx playwright merge-reports"})," tool"]}),"\n",(0,i.jsxs)(s.p,{children:["If you run tests on multiple shards, you can now merge all reports in a single HTML report (or any other report) using the new ",(0,i.jsx)(s.code,{children:"merge-reports"})," CLI tool."]}),"\n",(0,i.jsxs)(s.p,{children:["Using ",(0,i.jsx)(s.code,{children:"merge-reports"})," tool requires the following steps:"]}),"\n",(0,i.jsxs)(s.ol,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:'Adding a new "blob" reporter to the config when running on CI:'}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="playwright.config.ts"',children:"export default defineConfig({\n  testDir: './tests',\n  reporter: process.env.CI ? 'blob' : 'html',\n});\n"})}),"\n",(0,i.jsx)(s.p,{children:'The "blob" reporter will produce ".zip" files that contain all the information about the test run.'}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:['Copying all "blob" reports in a single shared location and running ',(0,i.jsx)(s.code,{children:"npx playwright merge-reports"}),":"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"npx playwright merge-reports --reporter html ./all-blob-reports\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Read more in ",(0,i.jsx)(s.a,{href:"/docs/test-sharding",children:"our documentation"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"-debian-12-bookworm-support",children:"\u{1F4DA} Debian 12 Bookworm Support"}),"\n",(0,i.jsx)(s.p,{children:"Playwright now supports Debian 12 Bookworm on both x86_64 and arm64 for Chromium, Firefox and WebKit. Let us know if you encounter any issues!"}
1),"\n",(0,i.jsx)(s.p,{children:"Linux support looks like this:"}),"\n",(0,i.jsxs)(s.table,{children:[(0,i.jsx)(s.thead,{children:(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.th,{style:{textAlign:"left"}}),(0,i.jsx)(s.th,{style:{textAlign:"center"},children:"Ubuntu 20.04"}),(0,i.jsx)(s.th,{style:{textAlign:"center"},children:"Ubuntu 22.04"}),(0,i.jsx)(s.th,{style:{textAlign:"center"},children:"Debian 11"}),(0,i.jsx)(s.th,{style:{textAlign:"center"},children:"Debian 12"})]})}),(0,i.jsxs)(s.tbody,{children:[(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.td,{style:{textAlign:"left"},children:"Chromium"}),(0,i.jsx)(s.td,{style:{textAlign:"center"},children:"\u2705"}),(0,i.jsx)(s.td,{style:{textAlign:"center"},children:"\u2705"}),(0,i.jsx)(s.td,{style:{textAlign:"center"},children:"\u2705"}),(0,i.jsx)(s.td,{style:{textAlign:"center"},children:"\u2705"})]}),(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.td,{style:{textAlign:"left"},children:"WebKit"}),(0,i.jsx)(s.td,{style:{textAlign:"center"},children:"\u2705"}),(0,i.jsx)(s.td,{style:{textAlign:"center"},children:"\u2705"}),(0,i.jsx)(s.td,{style:{textAlign:"center"},children:"\u2705"}),(0,i.jsx)(s.td,{style:{textAlign:"center"},children:"\u2705"})]}),(0,i.jsxs)(s.tr,{children:[(0,i.jsx)(s.td,{style:{textAlign:"left"},children:"Firefox"}),(0,i.jsx)(s.td,{style:{textAlign:"center"},children:"\u2705"}),(0,i.jsx)(s.td,{style:{textAlign:"center"},children:"\u2705"}),(0,i.jsx)(s.td,{style:{textAlign:"center"},children:"\u2705"}),(0,i.jsx)(s.td,{style:{textAlign:"center"},children:"\u2705"})]})]})]}),"\n",(0,i.jsx)(s.h3,{id:"ui-mode-updates-2",children:"UI Mode Updates"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"UI Mode now respects project dependencies. You can control which dependencies to respect by checking/unchecking them in a projects list."}),"\n",(0,i.jsx)(s.li,{children:"Console logs from the test are now displayed in the Console tab."}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-26",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 116.0.5845.82"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 115.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 17.0"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 115"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 115"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-136",children:"Version 1.36"}),"\n",(0,i.jsx)(s.p,{children:"\u{1F3DD}\uFE0F Summer maintenance release."}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-27",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 115.0.5790.75"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 115.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 17.0"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 114"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 114"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-135",children:"Version 1.35"}),"\n",(0,i.jsx)(o.A,{id:"pJiirfyJwcA",title:"Playwright 1.35"}),"\n",(0,i.jsx)(s.h3,{id:"highlights-2",children:"Highlights"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:'UI mode is now available in VSCode Playwright extension via a new "Show trace viewer" button:'}),"\n",(0,i.jsx)("img",{src:"https://github.com/microsoft/playwright/assets/746130/13094128-259b-477a-8bbb-c1181178e8a2",alt:"Playwright UI Mode",width:"1274",height:"722"}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["UI mode and trace viewer mark network requests handled with ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-route",children:"page.route()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-route",children:"browserContext.route()"})," handlers, as well as those issued via the ",(0,i.jsx)(s.a,{href:"./api-testing",children:"API testing"}),":"]}),"\n",(0,i.jsx)("img",{src:"https://github.com/microsoft/playwright/assets/746130/0df2d4b6-faa3-465c-aff3-c435b430bfe1",alt:"Trace Viewer",width:"1970",height:"1204"}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New option ",(0,i.jsx)(s.code,{children:"maskColor"})," for methods ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-screenshot",children:"page.screenshot()"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-screenshot",children:"locator.screenshot()"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-pageassertions#page-assertions-to-have-screenshot-1",children:"expect(page).toHaveScreenshot()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-have-screenshot-1",children:"expect(locator).toHaveScreenshot()"})," to change default masking color:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.goto('https://playwright.dev');\nawait expect(page).toHaveScreenshot({\n  mask: [page.locator('img')],\n  maskColor: '#00FF00', // green\n});\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.code,{children:"uninstall"})," CLI command to uninstall browser binaries:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"$ npx playwright uninstall # remove browsers installed by this installation\n$ npx playwright uninstall --all # remove all ever-install Playwright browsers\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:"Both UI mode and trace viewer now could be opened in a browser tab:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"$ npx playwright test --ui-port 0 # open UI mode in a tab on a random port\n$ npx playwright show-trace --port 0 # open trace viewer in tab on a random port\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"\uFE0F-breaking-changes",children:"\u26A0\uFE0F Breaking changes"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"playwright-core"})," binary got renamed from ",(0,i.jsx)(s.code,{children:"playwright"})," to ",(0,i.jsx)(s.code,{children:"playwright-core"}),". So if you use ",(0,i.jsx)(s.code,{children:"playwright-core"})," CLI, make sure to update the name:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"$ npx playwright-core install # the new way to install browsers when using playwright-core\n"})}),"\n",(0,i.jsxs)(s.p,{children:["This change ",(0,i.jsx)(s.strong,{children:"does not"})," affect ",(0,i.jsx)(s.code,{children:"@playwright/test"})," and ",(0,i.jsx)(s.code,{children:"playwright"})," package users."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-28",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 115.0.5790.13"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 113.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 16.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 114"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 114"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-134",children:"Version 1.34"}),"\n",(0,i.jsx)(o.A,{id:"JeFD6rqDbBo",title:"Playwright 1.34"}),"\n",(0,i.jsx)(s.h3,{id:"highlights-3",children:"Highlights"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:"UI Mode now shows steps, fixtures and attachments:"}),"\n",(0,i.jsx)("img",{src:"https://github.com/microsoft/playwright/assets/746130/1d280419-d79a-4a56-b2dc-54d631281d56",alt:"UI Mode attachments",width:"2306",height:"1754"}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New property ",(0,i.jsx)(s.a,{href:"/docs/api/class-testproject#test-project-teardown",children:"testProject.teardown"})," to specify a project that needs to run after this and all dependent projects have finished. Teardown is useful to cleanup any resources acquired by this project."]}),"\n",(0,i.jsxs)(s.p,{children:["A common pattern would be a ",(0,i.jsx)(s.code,{children:"setup"})," dependency with a corresponding ",(0,i.jsx)(s.code,{children:"teardown"}),":"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="playwright.config.ts"',children:"import { defineConfig } from '@playwright/test';
1\n\nexport default defineConfig({\n  projects: [\n    {\n      name: 'setup',\n      testMatch: /global.setup\\.ts/,\n      teardown: 'teardown',\n    },\n    {\n      name: 'teardown',\n      testMatch: /global.teardown\\.ts/,\n    },\n    {\n      name: 'chromium',\n      use: devices['Desktop Chrome'],\n      dependencies: ['setup'],\n    },\n    {\n      name: 'firefox',\n      use: devices['Desktop Firefox'],\n      dependencies: ['setup'],\n    },\n    {\n      name: 'webkit',\n      use: devices['Desktop Safari'],\n      dependencies: ['setup'],\n    },\n  ],\n});\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New method ",(0,i.jsx)(s.a,{href:"/docs/test-assertions#expectconfigure",children:(0,i.jsx)(s.code,{children:"expect.configure"})})," to create pre-configured expect instance with its own defaults such as ",(0,i.jsx)(s.code,{children:"timeout"})," and ",(0,i.jsx)(s.code,{children:"soft"}),"."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const slowExpect = expect.configure({ timeout: 10000 });\nawait slowExpect(locator).toHaveText('Submit');\n\n// Always do soft assertions.\nconst softExpect = expect.configure({ soft: true });\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New options ",(0,i.jsx)(s.code,{children:"stderr"})," and ",(0,i.jsx)(s.code,{children:"stdout"}),"  in ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-web-server",children:"testConfig.webServer"})," to configure output handling:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="playwright.config.ts"',children:"import { defineConfig } from '@playwright/test';\n\nexport default defineConfig({\n  // Run your local dev server before starting the tests\n  webServer: {\n    command: 'npm run start',\n    url: 'http://127.0.0.1:3000',\n    reuseExistingServer: !process.env.CI,\n    stdout: 'pipe',\n    stderr: 'pipe',\n  },\n});\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-and",children:"locator.and()"})," to create a locator that matches both locators."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const button = page.getByRole('button').and(page.getByTitle('Subscribe'));\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New events ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-event-console",children:"browserContext.on('console')"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-event-dialog",children:"browserContext.on('dialog')"})," to subscribe to any dialogs and console messages from any page from the given browser context. Use the new methods ",(0,i.jsx)(s.a,{href:"/docs/api/class-consolemessage#console-message-page",children:"consoleMessage.page()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-dialog#dialog-page",children:"dialog.page()"})," to pin-point event source."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"\uFE0F-breaking-changes-1",children:"\u26A0\uFE0F Breaking changes"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"npx playwright test"})," no longer works if you install both ",(0,i.jsx)(s.code,{children:"playwright"})," and ",(0,i.jsx)(s.code,{children:"@playwright/test"}),". There's no need to install both, since you can always import browser automation APIs from ",(0,i.jsx)(s.code,{children:"@playwright/test"})," directly:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="automation.ts"',children:"import { chromium, firefox, webkit } from '@playwright/test';\n/* ... */\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Node.js 14 is no longer supported since it ",(0,i.jsx)(s.a,{href:"https://nodejs.dev/en/about/releases/",children:"reached its end-of-life"})," on April 30, 2023."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-29",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 114.0.5735.26"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 113.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 16.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 113"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 113"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-133",children:"Version 1.33"}),"\n",(0,i.jsx)(o.A,{id:"JeFD6rqDbBo",title:"Playwright 1.33"}),"\n",(0,i.jsx)(s.h3,{id:"locators-update",children:"Locators Update"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Use ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-or",children:"locator.or()"}),' to create a locator that matches either of the two locators. Consider a scenario where you\'d like to click on a "New email" button, but sometimes a security settings dialog shows up instead. In this case, you can wait for either a "New email" button, or a dialog and act accordingly:']}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const newEmail = page.getByRole('button', { name: 'New email' });\nconst dialog = page.getByText('Confirm security settings');\nawait expect(newEmail.or(dialog)).toBeVisible();\nif (await dialog.isVisible())\n  await page.getByRole('button', { name: 'Dismiss' }).click();\nawait newEmail.click();\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Use new options ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-filter-option-has-not",children:"hasNot"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-filter-option-has-not-text",children:"hasNotText"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-filter",children:"locator.filter()"})," to find elements that ",(0,i.jsx)(s.strong,{children:"do not match"})," certain conditions."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const rowLocator = page.locator('tr');\nawait rowLocator\n    .filter({ hasNotText: 'text in column 1' })\n    .filter({ hasNot: page.getByRole('button', { name: 'column 2 button' }) })\n    .screenshot();\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Use new web-first assertion ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-be-attached",children:"expect(locator).toBeAttached()"})," to ensure that the element is present in the page's DOM. Do not confuse with the ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-be-visible",children:"expect(locator).toBeVisible()"})," that ensures that element is both attached & visible."]}),"\n"]}),"\n"]}
1),"\n",(0,i.jsx)(s.h3,{id:"new-apis-15",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-or",children:"locator.or()"})}),"\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-filter-option-has-not",children:"hasNot"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-filter",children:"locator.filter()"})]}),"\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-filter-option-has-not-text",children:"hasNotText"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-filter",children:"locator.filter()"})]}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-be-attached",children:"expect(locator).toBeAttached()"})}),"\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.a,{href:"/docs/api/class-route#route-fetch-option-timeout",children:"timeout"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-route#route-fetch",children:"route.fetch()"})]}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-reporter#reporter-on-exit",children:"reporter.onExit()"})}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"\uFE0F-breaking-change",children:"\u26A0\uFE0F Breaking change"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["The ",(0,i.jsx)(s.code,{children:"mcr.microsoft.com/playwright:v1.33.0"})," now serves a Playwright image based on Ubuntu Jammy. To use the focal-based image, please use ",(0,i.jsx)(s.code,{children:"mcr.microsoft.com/playwright:v1.33.0-focal"})," instead."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-30",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 113.0.5672.53"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 112.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 16.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 112"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 112"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-132",children:"Version 1.32"}),"\n",(0,i.jsx)(o.A,{id:"jF0yA-JLQW0",title:"Playwright 1.32"}),"\n",(0,i.jsx)(s.h3,{id:"introducing-ui-mode-preview",children:"Introducing UI Mode (preview)"}),"\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/test-ui-mode",children:"UI Mode"})," lets you explore, run and debug tests. Comes with a built-in watch mode."]}),"\n",(0,i.jsx)("img",{src:"https://user-images.githubusercontent.com/746130/227004851-3901a691-4f8e-43d6-8d6b-cbfeafaeb999.png",alt:"Playwright UI Mode",width:"2784",height:"1824"}),"\n",(0,i.jsxs)(s.p,{children:["Engage with a new flag ",(0,i.jsx)(s.code,{children:"--ui"}),":"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-sh",children:"npx playwright test --ui\n"})}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-16",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New options ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-route-from-har-option-update-mode",children:"updateMode"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-route-from-har-option-update-content",children:"updateContent"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-route-from-har",children:"page.routeFromHAR()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-route-from-har",children:"browserContext.routeFromHAR()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["Chaining existing locator objects, see ",(0,i.jsx)(s.a,{href:"/docs/locators#matching-inside-a-locator",children:"locator docs"})," for details."]}),"\n",(0,i.jsxs)(s.li,{children:["New property ",(0,i.jsx)(s.a,{href:"/docs/api/class-testinfo#test-info-test-id",children:"testInfo.testId"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.a,{href:"/docs/api/class-tracing#tracing-start-chunk-option-name",children:"name"})," in method ",(0,i.jsx)(s.a,{href:"/docs/api/class-tracing#tracing-start-chunk",children:"tracing.startChunk()"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"\uFE0F-breaking-change-in-component-tests",children:"\u26A0\uFE0F Breaking change in component tests"}),"\n",(0,i.jsxs)(s.p,{children:["Note: ",(0,i.jsx)(s.strong,{children:"component tests only"}
1),", does not affect end-to-end tests."]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"@playwright/experimental-ct-react"})," now supports ",(0,i.jsx)(s.strong,{children:"React 18 only"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["If you're running component tests with React 16 or 17, please replace ",(0,i.jsx)(s.code,{children:"@playwright/experimental-ct-react"})," with ",(0,i.jsx)(s.code,{children:"@playwright/experimental-ct-react17"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-31",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 112.0.5615.29"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 111.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 16.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 111"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 111"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-131",children:"Version 1.31"}),"\n",(0,i.jsx)(o.A,{id:"PI50YAPTAs4",title:"Playwright 1.31"}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-17",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New property ",(0,i.jsx)(s.a,{href:"/docs/api/class-testproject#test-project-dependencies",children:"testProject.dependencies"})," to configure dependencies between projects."]}),"\n",(0,i.jsx)(s.p,{children:"Using dependencies allows global setup to produce traces and other artifacts, see the setup steps in the test report and more."}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="playwright.config.ts"',children:"import { defineConfig } from '@playwright/test';\n\nexport default defineConfig({\n  projects: [\n    {\n      name: 'setup',\n      testMatch: /global.setup\\.ts/,\n    },\n    {\n      name: 'chromium',\n      use: devices['Desktop Chrome'],\n      dependencies: ['setup'],\n    },\n    {\n      name: 'firefox',\n      use: devices['Desktop Firefox'],\n      dependencies: ['setup'],\n    },\n    {\n      name: 'webkit',\n      use: devices['Desktop Safari'],\n      dependencies: ['setup'],\n    },\n  ],\n});\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New assertion ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-be-in-viewport",children:"expect(locator).toBeInViewport()"})," ensures that locator points to an element that intersects viewport, according to the ",(0,i.jsx)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API",children:"intersection observer API"}),"."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const button = page.getByRole('button');\n\n// Make sure at least some part of element intersects viewport.\nawait expect(button).toBeInViewport();\n\n// Make sure element is fully outside of viewport.\nawait expect(button).not.toBeInViewport();\n\n// Make sure that at least half of the element intersects viewport.\nawait expect(button).toBeInViewport({ ratio: 0.5 });\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"miscellaneous-15",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"DOM snapshots in trace viewer can be now opened in a separate window."}),"\n",(0,i.jsxs)(s.li,{children:["New method ",(0,i.jsx)(s.code,{children:"defineConfig"})," to be used in ",(0,i.jsx)(s.code,{children:"playwright.config"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.a,{href:"/docs/api/class-route#route-fetch-option-max-redirects",children:"maxRedirects"})," for method ",(0,i.jsx)(s.a,{href:"/docs/api/class-route#route-fetch",children:"route.fetch()"}),"."]}),"\n",(0,i.jsx)(s.li,{children:"Playwright now supports Debian 11 arm64."}),"\n",(0,i.jsxs)(s.li,{children:["Official ",(0,i.jsx)(s.a,{href:"/docs/docker",children:"docker images"})," now include Node 18 instead of Node 16."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"\uFE0F-breaking-change-in-component-tests-1",children:"\u26A0\uFE0F Breaking change in component tests"}),"\n",(0,i.jsxs)(s.p,{children:["Note: ",(0,i.jsx)(s.strong,{children:"component tests only"}
1),", does not affect end-to-end tests."]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"playwright-ct.config"})," configuration file for ",(0,i.jsx)(s.a,{href:"/docs/test-components",children:"component testing"})," now requires calling ",(0,i.jsx)(s.code,{children:"defineConfig"}),"."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// Before\n\nimport { type PlaywrightTestConfig, devices } from '@playwright/experimental-ct-react';\nconst config: PlaywrightTestConfig = {\n  // ... config goes here ...\n};\nexport default config;\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Replace ",(0,i.jsx)(s.code,{children:"config"})," variable definition with ",(0,i.jsx)(s.code,{children:"defineConfig"})," call:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// After\n\nimport { defineConfig, devices } from '@playwright/experimental-ct-react';\nexport default defineConfig({\n  // ... config goes here ...\n});\n"})}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-32",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 111.0.5563.19"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 109.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 16.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 110"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 110"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-130",children:"Version 1.30"}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-33",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 110.0.5481.38"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 108.0.2"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 16.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 109"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 109"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-129",children:"Version 1.29"}),"\n",(0,i.jsx)(o.A,{id:"VbVlz61VtNo",title:"Playwright 1.29"}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-18",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New method ",(0,i.jsx)(s.a,{href:"/docs/api/class-route#route-fetch",children:"route.fetch()"})," and new option ",(0,i.jsx)(s.code,{children:"json"})," for ",(0,i.jsx)(s.a,{href:"/docs/api/class-route#route-fulfill",children:"route.fulfill()"}),":"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.route('**/api/settings', async route => {\n  // Fetch original settings.\n  const response = await route.fetch();\n\n  // Force settings theme to a predefined value.\n  const json = await response.json();\n  json.theme = 'Solorized';\n\n  // Fulfill with modified data.\n  await route.fulfill({ json });\n});\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New method ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-all",children:"locator.all()"})," to iterate over all matching elements:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// Check all checkboxes!\nconst checkboxes = page.getByRole('checkbox');\nfor (const checkbox of await checkboxes.all())\n  await checkbox.check();\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-select-option",children:"locator.selectOption()"})," matches now by value or label:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-html",children:'<select multiple>\n  <option value="red">Red</option>\n  <option value="green">Green</option>\n  <option value="blue">Blue</option>\n</select>\n'})}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await element.selectOption('Red');\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:"Retry blocks of code until all assertions pass:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await expect(async () => {\n  const response = await page.request.get('https://api.example.com');\n  await expect(response).toBeOK();\n}).toPass();\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Read more in ",(0,i.jsx)(s.a,{href:"/docs/test-assertions#expecttopass",children:"our documentation"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Automatically capture ",(0,i.jsx)(s.strong,{children:"full page screenshot"})," on test failure:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="playwright.config.ts"',children:"import { defineConfig } from '@playwright/test';\nexport default defineConfig({\n  use: {\n    screenshot: {\n      mode: 'only-on-failure',\n      fullPage: true,\n    }\n  }\n});\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"miscellaneous-16",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Playwright Test now respects ",(0,i.jsx)(s.a,{href:"https://code.visualstudio.com/docs/languages/jsconfig",children:(0,i.jsx)(s.code,{children:"jsconfig.json"})}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["New options ",(0,i.jsx)(s.code,{children:"args"})," and ",(0,i.jsx)(s.code,{children:"proxy"})," for ",(0,i.jsx)(s.a,{href:"/docs/api/class-androiddevice#android-device-launch-browser",children:"androidDevice.launchBrowser()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["Option ",(0,i.jsx)(s.code,{children:"postData"})," in method ",(0,i.jsx)(s.a,{href:"/docs/api/class-route#route-continue",children:"route.continue()"})," now supports ",(0,i.jsx)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#Description",title:"Serializable",children:"Serializable"})," values."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-34",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 109.0.5414.46"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 107.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 16.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 108"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 108"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-128",children:"Version 1.28"}),"\n",(0,i.jsx)(o.A,{id:"tVSq-0n-TY4",title:"Playwright 1.28"}),"\n",(0,i.jsx)(s.h3,{id:"playwright-tools",children:"Playwright Tools"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Record at Cursor in VSCode."})," You can run the test, position the cursor at the end of the test and continue generating the test."]}),"\n"]}),"\n",(0,i.jsx)("img",{src:"https://user-images.githubusercontent.com/746130/202005839-aba2eeba-217b-424d-8496-8b4f5fa72f41.png",alt:"New VSCode Extension",width:"2704",height:"1814"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Live Locators in VSCode."})," You can hover and edit locators in VSCode to get them  highlighted in the opened browser."]}
1),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Live Locators in CodeGen."}),' Generate a locator for any element on the page using "Explore" tool.']}),"\n"]}),"\n",(0,i.jsx)("img",{src:"https://user-images.githubusercontent.com/746130/201796876-01567a0b-ca61-4a9d-b12b-04786c471671.png",alt:"Locator Explorer",width:"1382",height:"1090"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Codegen and Trace Viewer Dark Theme."})," Automatically picked up from operating system settings."]}),"\n"]}),"\n",(0,i.jsx)("img",{src:"https://user-images.githubusercontent.com/746130/201797969-603f74df-d7cf-4c56-befd-798dbd269796.png",alt:"Dark Theme",width:"2418",height:"1726"}),"\n",(0,i.jsx)(s.h3,{id:"test-runner-7",children:"Test Runner"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Configure retries and test timeout for a file or a test with ",(0,i.jsx)(s.a,{href:"/docs/api/class-test#test-describe-configure",children:"test.describe.configure()"}),"."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// Each test in the file will be retried twice and have a timeout of 20 seconds.\ntest.describe.configure({ retries: 2, timeout: 20_000 });\ntest('runs first', async ({ page }) => {});\ntest('runs second', async ({ page }) => {});\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Use ",(0,i.jsx)(s.a,{href:"/docs/api/class-testproject#test-project-snapshot-path-template",children:"testProject.snapshotPathTemplate"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-snapshot-path-template",children:"testConfig.snapshotPathTemplate"})," to configure a template controlling location of snapshots generated by ",(0,i.jsx)(s.a,{href:"/docs/api/class-pageassertions#page-assertions-to-have-screenshot-1",children:"expect(page).toHaveScreenshot()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-snapshotassertions#snapshot-assertions-to-match-snapshot-1",children:"expect(value).toMatchSnapshot()"}),"."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="playwright.config.ts"',children:"import { defineConfig } from '@playwright/test';\nexport default defineConfig({\n  testDir: './tests',\n  snapshotPathTemplate: '{testDir}/__screenshots__/{testFilePath}/{arg}{ext}',\n});\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-19",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-blur",children:"locator.blur()"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-clear",children:"locator.clear()"})}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-android#android-launch-server",children:"android.launchServer()"})," and  ",(0,i.jsx)(s.a,{href:"/docs/api/class-android#android-connect",children:"android.connect()"})]}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-androiddevice#android-device-event-close",children:"androidDevice.on('close')"})}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-35",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 108.0.5359.29"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 106.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 16.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 107"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 107"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-127",children:"Version 1.27"}),"\n",(0,i.jsx)(o.A,{id:"b84eqab3kwc",title:"Playwright 1.27"}),"\n",(0,i.jsx)(s.h3,{id:"locators-1",children:"Locators"}),"\n",(0,i.jsx)(s.p,{children:"With these new APIs writing locators is a joy:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-get-by-text",children:"page.getByText()"})," to locate by text content."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-get-by-role",children:"page.getByRole()"})," to locate by ",(0,i.jsx)(s.a,{href:"https://www.w3.org/TR/wai-aria-1.2/#roles",children:"ARIA role"}),", ",(0,i.jsx)(s.a,{href:"https://www.w3.org/TR/wai-aria-1.2/#aria-attributes",children:"ARIA attributes"})," and ",(0,i.jsx)(s.a,{href:"https://w3c.github.io/accname/#dfn-accessible-name",children:"accessible name"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-get-by-label",children:"page.getByLabel()"})," to locate a form control by associated label's text."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-get-by-test-id",children:"page.getByTestId()"})," to locate an element based on its ",(0,i.jsx)(s.code,{children:"data-testid"})," attribute (other attribute can be configured)."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-get-by-placeholder",children:"page.getByPlaceholder()"})," to locate an input by placeholder."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-get-by-alt-text",children:"page.getByAltText()"})," to locate an element, usually image, by its text alternative."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-get-by-title",children:"page.getByT
1itle()"})," to locate an element by its title."]}),"\n"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.getByLabel('User Name').fill('John');\n\nawait page.getByLabel('Password').fill('secret-password');\n\nawait page.getByRole('button', { name: 'Sign in' }).click();\n\nawait expect(page.getByText('Welcome, John!')).toBeVisible();\n"})}),"\n",(0,i.jsxs)(s.p,{children:["All the same methods are also available on ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator",title:"Locator",children:"Locator"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-framelocator",title:"FrameLocator",children:"FrameLocator"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-frame",title:"Frame",children:"Frame"})," classes."]}),"\n",(0,i.jsx)(s.h3,{id:"other-highlights",children:"Other highlights"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"workers"})," option in the ",(0,i.jsx)(s.code,{children:"playwright.config.ts"})," now accepts a percentage string to use some of the available CPUs. You can also pass it in the command line:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"npx playwright test --workers=20%\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New options ",(0,i.jsx)(s.code,{children:"host"})," and ",(0,i.jsx)(s.code,{children:"port"})," for the html reporter."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"import { defineConfig } from '@playwright/test';\n\nexport default defineConfig({\n  reporter: [['html', { host: 'localhost', port: '9223' }]],\n});\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New field ",(0,i.jsx)(s.code,{children:"FullConfig.configFile"})," is available to test reporters, specifying the path to the config file if any."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:"As announced in v1.25, Ubuntu 18 will not be supported as of Dec 2022. In addition to that, there will be no WebKit updates on Ubuntu 18 starting from the next Playwright release."}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"behavior-changes",children:"Behavior Changes"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-have-attribute",children:"expect(locator).toHaveAttribute()"})," with an empty value does not match missing attribute anymore. For example, the following snippet will succeed when ",(0,i.jsx)(s.code,{children:"button"})," ",(0,i.jsx)(s.strong,{children:"does not"})," have a ",(0,i.jsx)(s.code,{children:"disabled"})," attribute."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await expect(page.getByRole('button')).toHaveAttribute('disabled', '');\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Command line options ",(0,i.jsx)(s.code,{children:"--grep"})," and ",(0,i.jsx)(s.code,{children:"--grep-invert"})," previously incorrectly ignored ",(0,i.jsx)(s.code,{children:"grep"})," and ",(0,i.jsx)(s.code,{children:"grepInvert"})," options specified in the config. Now all of them are applied together."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-36",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 107.0.5304.18"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 105.0.1"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 16.0"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 106"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 106"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-126",children:"Version 1.26"}),"\n",(0,i.jsx)(o.A,{id:"b84eqab3kwc",title:"Playwright 1.26"}),"\n",(0,i.jsx)(s.h3,{id:"assertions",children:"Assertions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.code,{children:"enabled"})," for ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-be-enabled",children:"expect(locator).toBeEnabled()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-have-text",children:"expect(locator).toHaveText()"})," now pierces open shadow roots."]}),"\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.code,{children:"editable"})," for ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-be-editable",children:"expect(locator).toBeEditable()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.code,{children:"visible"})," for ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-be-visible",children:"expect(locator).toBeVisible()"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"other-highlights-1",children:"Other highlights"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.code,{children:"maxRedirects"})," for ",(0,i.jsx)(s.a,{href:"/docs/api/class-apirequestcontext#api-request-context-get",children:"apiRequestContext.get()"})," and others to limit redirect count."]}),"\n",(0,i.jsxs)(s.li,{children:["New command-line flag ",(0,i.jsx)(s.code,{children:"--pass-with-no-tests"})," that allows the test suite to pass when no files are found."]}),"\n",(0,i.jsxs)(s.li,{children:["New command-line flag ",(0,i.jsx)(s.code,{children:"--ignore-snapsh
1ots"})," to skip snapshot expectations, such as ",(0,i.jsx)(s.code,{children:"expect(value).toMatchSnapshot()"})," and ",(0,i.jsx)(s.code,{children:"expect(page).toHaveScreenshot()"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"behavior-change",children:"Behavior Change"}),"\n",(0,i.jsxs)(s.p,{children:["A bunch of Playwright APIs already support the ",(0,i.jsx)(s.code,{children:"waitUntil: 'domcontentloaded'"})," option. For example:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.goto('https://playwright.dev', {\n  waitUntil: 'domcontentloaded',\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Prior to 1.26, this would wait for all iframes to fire the ",(0,i.jsx)(s.code,{children:"DOMContentLoaded"})," event."]}),"\n",(0,i.jsxs)(s.p,{children:["To align with web specification, the ",(0,i.jsx)(s.code,{children:"'domcontentloaded'"})," value only waits for the target frame to fire the ",(0,i.jsx)(s.code,{children:"'DOMContentLoaded'"})," event. Use ",(0,i.jsx)(s.code,{children:"waitUntil: 'load'"})," to wait for all iframes."]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-37",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 106.0.5249.30"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 104.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 16.0"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 105"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 105"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-125",children:"Version 1.25"}),"\n",(0,i.jsx)(o.A,{id:"NFLHA57a-so",title:"Playwright 1.25"}),"\n",(0,i.jsx)(s.h3,{id:"vscode-extension",children:"VSCode Extension"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Watch your tests running live & keep devtools open."}),"\n",(0,i.jsx)(s.li,{children:"Pick selector."}),"\n",(0,i.jsx)(s.li,{children:"Record new test from current page state."}),"\n"]}),"\n",(0,i.jsx)("img",{src:"https://user-images.githubusercontent.com/746130/183781999-1b9fdbc5-cfae-47d6-b4f7-5d4ae89716a8.jpg",alt:"vscode extension screenshot",width:"2560",height:"1039"}),"\n",(0,i.jsx)(s.h3,{id:"test-runner-8",children:"Test Runner"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-test#test-step",children:"test.step()"})," now returns the value of the step function:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"test('should work', async ({ page }) => {\n  const pageTitle = await test.step('get title', async () => {\n    await page.goto('https://playwright.dev');\n    return await page.title();\n  });\n  console.log(pageTitle);\n});\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Added ",(0,i.jsx)(s.a,{href:"/docs/api/class-test#test-describe-fixme",children:"test.describe.fixme()"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.code,{children:"'interrupted'"})," test status."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Enable tracing via CLI flag: ",(0,i.jsx)(s.code,{children:"npx playwright test --trace=on"}),"."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"announcements-3",children:"Announcements"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\u{1F381} We now ship Ubuntu 22.04 Jammy Jellyfish docker image: ",(0,i.jsx)(s.code,{children:"mcr.microsoft.com/playwright:v1.34.0-jammy"}),"."]}),"\n",(0,i.jsx)(s.li,{children:"\u{1FAA6} This is the last release with macOS 10.15 support (deprecated as of 1.21)."}),"\n",(0,i.jsx)(s.li,{children:"\u{1FAA6} This is the last release with Node.js 12 support, we recommend upgrading to Node.js LTS (16)."}),"\n",(0,i.jsx)(s.li,{children:"\u26A0\uFE0F Ubuntu 18 is now deprecated and will not be supported as of Dec 2022."}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-38",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 105.0.5195.19"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 103.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 16.0"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 104"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 104"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-124",children:"Version 1.24"}),"\n",(0,i.jsx)(o.A,{id:"9F05o1shxcY",title:"Playwright 1.24"}),"\n",(0,i.jsxs)(s.h3,{id:"-multiple-web-servers-in-playwrightconfigts",children:["\u{1F30D} Multiple Web Servers in ",(0,i.jsx)(s.code,{children:"playwright.config.ts"})]}),"\n",(0,i.jsx)(s.p,{children:"Launch multiple web servers, databases, or other processes by passing an array of configurations:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="playwright.config.ts"',children:"import { defineConfig } from '@playwright/test';\nexport default defineConfig({\n  webServer: [\n    {\n      command: 'npm run start',\n      url: 'http://127.0.0.1:3000',\n      timeout: 120 * 1000,\n      reuseExistingServer: !process.env.CI,\n    },\n    {\n      command: 'npm run backend',\n      url: 'http://127.0.0.1:3333',\n      timeout: 120 * 1000,\n      reuseExistingServer: !process.env.CI,\n    }\n  ],\n  use: {\n    baseURL: 'http://localhost:3000/',\n  },\n});\n"})}),"\n",(0,i.jsx)(s.h3,{id:"-debian-11-bullseye-support",children:"\u{1F402} Debian 11 Bullseye Support"}),"\n",(0,i.jsx)(s.p,{children:"Playwright now supports Debian 11 Bullseye on x86_64 for Chromium, Firefox and WebKit. Let us know if you encounter any issues!"}
1),"\n",(0,i.jsx)(s.p,{children:"Linux support looks like this:"}),"\n",(0,i.jsx)(s.p,{children:"|          | Ubuntu 20.04 | Ubuntu 22.04 | Debian 11\n| :--- | :---: | :---: | :---: | :---: |\n| Chromium | \u2705 | \u2705 | \u2705 |\n| WebKit | \u2705 | \u2705 | \u2705 |\n| Firefox | \u2705 | \u2705 | \u2705 |"}),"\n",(0,i.jsx)(s.h3,{id:"\uFE0F-anonymous-describe",children:"\u{1F575}\uFE0F Anonymous Describe"}),"\n",(0,i.jsxs)(s.p,{children:["It is now possible to call ",(0,i.jsx)(s.a,{href:"/docs/api/class-test#test-describe",children:"test.describe()"})," to create suites without a title. This is useful for giving a group of tests a common option with ",(0,i.jsx)(s.a,{href:"/docs/api/class-test#test-use",children:"test.use()"}),"."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"test.describe(() => {\n  test.use({ colorScheme: 'dark' });\n\n  test('one', async ({ page }) => {\n    // ...\n  });\n\n  test('two', async ({ page }) => {\n    // ...\n  });\n});\n"})}),"\n",(0,i.jsx)(s.h3,{id:"-component-tests-update",children:"\u{1F9E9} Component Tests Update"}),"\n",(0,i.jsxs)(s.p,{children:["Playwright 1.24 Component Tests introduce ",(0,i.jsx)(s.code,{children:"beforeMount"})," and ",(0,i.jsx)(s.code,{children:"afterMount"})," hooks. Use these to configure your app for tests."]}),"\n",(0,i.jsx)(s.p,{children:"For example, this could be used to setup App router in Vue.js:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="src/component.spec.ts"',children:"import { test } from '@playwright/experimental-ct-vue';\nimport { Component } from './mycomponent';\n\ntest('should work', async ({ mount }) => {\n  const component = await mount(Component, {\n    hooksConfig: {\n      /* anything to configure your app */\n    }\n  });\n});\n"})}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="playwright/index.ts"',children:"import { router } from '../router';\nimport { beforeMount } from '@playwright/experimental-ct-vue/hooks';\n\nbeforeMount(async ({ app, hooksConfig }) => {\n  app.use(router);\n});\n"})}),"\n",(0,i.jsx)(s.p,{children:"A similar configuration in Next.js would look like this:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="src/component.spec.jsx"',children:"import { test } from '@playwright/experimental-ct-react';\nimport { Component } from './mycomponent';\n\ntest('should work', async ({ mount }) => {\n  const component = await mount(<Component></Component>, {\n    // Pass mock value from test into `beforeMount`.\n    hooksConfig: {\n      router: {\n        query: { page: 1, per_page: 10 },\n        asPath: '/posts'\n      }\n    }\n  });\n});\n"})}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="playwright/index.js"',children:"import router from 'next/router';\nimport { beforeMount } from '@playwright/experimental-ct-react/hooks';\n\nbeforeMount(async ({ hooksConfig }) => {\n  // Before mount, redefine useRouter to return mock value from test.\n  router.useRouter = () => hooksConfig.router;\n});\n"})}),"\n",(0,i.jsx)(s.h2,{id:"version-123",children:"Version 1.23"}),"\n",(0,i.jsx)(o.A,{id:"NRGOV46P3kU",title:"Playwright 1.23"}),"\n",(0,i.jsx)(s.h3,{id:"network-replay",children:"Network Replay"}),"\n",(0,i.jsx)(s.p,{children:"Now you can record network traffic into a HAR file and re-use this traffic in your tests."}),"\n",(0,i.jsx)(s.p,{children:"To record network into HAR file:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"npx playwright open --save-har=github.har.zip https://github.com/microsoft\n"})}),"\n",(0,i.jsx)(s.p,{children:"Alternatively, you can record HAR programmatically:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const context = await browser.newContext({\n  recordHar: { path: 'github.har.zip' }\n});\n// ... do stuff ...\nawait context.close();\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Use the new methods ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-route-from-har",children:"page.routeFromHAR()"})," or ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-route-from-har",children:"browserContext.routeFromHAR()"})," to serve matching responses from the ",(0,i.jsx)(s.a,{href:"http://www.softwareishard.com/blog/har-12-spec/",children:"HAR"})," file:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await context.routeFromHAR('github.har.zip');\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Read more in ",(0,i.jsx)(s.a,{href:"/docs/mock#mocking-with-har-files",children:"our documentation"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"advanced-routing",children:"Advanced Routing"}),"\n",(0,i.jsxs)(s.p,{children:["You can now use ",(0,i.jsx)(s.a,{href:"/docs/api/class-route#route-fallback",children:"route.fallback()"})," to defer routing to other handlers."]}),"\n",(0,i.jsx)(s.p,{children:"Consider the following example:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// Remove a header from all requests.\ntest.beforeEach(async ({ page }) =>
1 {\n  await page.route('**/*', async route => {\n    const headers = await route.request().allHeaders();\n    delete headers['if-none-match'];\n    await route.fallback({ headers });\n  });\n});\n\ntest('should work', async ({ page }) => {\n  await page.route('**/*', async route => {\n    if (route.request().resourceType() === 'image')\n      await route.abort();\n    else\n      await route.fallback();\n  });\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Note that the new methods ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-route-from-har",children:"page.routeFromHAR()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-route-from-har",children:"browserContext.routeFromHAR()"})," also participate in routing and could be deferred to."]}),"\n",(0,i.jsx)(s.h3,{id:"web-first-assertions-update",children:"Web-First Assertions Update"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["New method ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-have-values",children:"expect(locator).toHaveValues()"})," that asserts all selected values of ",(0,i.jsx)(s.code,{children:"<select multiple>"})," element."]}),"\n",(0,i.jsxs)(s.li,{children:["Methods ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-contain-text",children:"expect(locator).toContainText()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-have-text",children:"expect(locator).toHaveText()"})," now accept ",(0,i.jsx)(s.code,{children:"ignoreCase"})," option."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"component-tests-update",children:"Component Tests Update"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Support for Vue2 via the ",(0,i.jsx)(s.a,{href:"https://www.npmjs.com/package/@playwright/experimental-ct-vue2",children:(0,i.jsx)(s.code,{children:"@playwright/experimental-ct-vue2"})})," package."]}),"\n",(0,i.jsxs)(s.li,{children:["Support for component tests for ",(0,i.jsx)(s.a,{href:"https://www.npmjs.com/package/create-react-app",children:"create-react-app"})," with components in ",(0,i.jsx)(s.code,{children:".js"})," files."]}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["Read more about ",(0,i.jsx)(s.a,{href:"./test-components",children:"component testing with Playwright"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"miscellaneous-17",children:"Miscellaneous"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["If there's a service worker that's in your way, you can now easily disable it with a new context option ",(0,i.jsx)(s.code,{children:"serviceWorkers"}),":"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="playwright.config.ts"',children:"export default {\n  use: {\n    serviceWorkers: 'block',\n  }\n};\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Using ",(0,i.jsx)(s.code,{children:".zip"})," path for ",(0,i.jsx)(s.code,{children:"recordHar"})," context option automatically zips the resulting HAR:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const context = await browser.newContext({\n  recordHar: {\n    path: 'github.har.zip',\n  }\n});\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["If you intend to edit HAR by hand, consider using the ",(0,i.jsx)(s.code,{children:'"minimal"'})," HAR recording mode that only records information that is essential for replaying:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const context = await browser.newContext({\n  recordHar: {\n    path: 'github.har',\n    mode: 'minimal',\n  }\n});\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Playwright now runs on Ubuntu 22 amd64 and Ubuntu 22 arm64. We also publish new docker image ",(0,i.jsx)(s.code,{children:"mcr.microsoft.com/playwright:v1.34.0-jammy"}),"."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"\uFE0F-breaking-changes-\uFE0F",children:"\u26A0\uFE0F Breaking Changes \u26A0\uFE0F"}),"\n",(0,i.jsx)(s.p,{children:'WebServer is now considered "ready" if request to the specified url has any of the following HTTP status codes:'}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.code,{children:"200-299"})}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"300-399"})," (new)"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"400"}),", ",(0,i.jsx)(s.code,{children:"401"}),", ",(0,i.jsx)(s.code,{children:"402"}),", ",(0,i.jsx)(s.code,{children:"403"})," (new)"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-122",children:"Version 1.22"}),"\n",(0,i.jsx)(o.A,{id:"keV2CIgtBlg",title:"Playwright 1.22"}),"\n",(0,i.jsx)(s.h3,{id:"highlights-4",children:"Highlights"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:"Components Testing (preview)"}),"\n",(0,i.jsxs)(s.p,{children:["Playwright Test can now test your ",(0,i.jsx)(s.a,{href:"https://reactjs.org/",children:"React"})," or ",(0,i.jsx)(s.a,{href:"https://vuejs.org/",children:"Vue.js"})," components. You can use all the features of Playwright Test (such as parallelization, emulation & debugging) 
1while running components in real browsers."]}),"\n",(0,i.jsx)(s.p,{children:"Here is what a typical component test looks like:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="App.spec.tsx"',children:"import { test, expect } from '@playwright/experimental-ct-react';\nimport App from './App';\n\n// Let's test component in a dark scheme!\ntest.use({ colorScheme: 'dark' });\n\ntest('should render', async ({ mount }) => {\n  const component = await mount(<App></App>);\n\n  // As with any Playwright test, assert locator text.\n  await expect(component).toContainText('React');\n  // Or do a screenshot \u{1F680}\n  await expect(component).toHaveScreenshot();\n  // Or use any Playwright method\n  await component.click();\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Read more in ",(0,i.jsx)(s.a,{href:"./test-components",children:"our documentation"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Role selectors that allow selecting elements by their ",(0,i.jsx)(s.a,{href:"https://www.w3.org/TR/wai-aria-1.2/#roles",children:"ARIA role"}),", ",(0,i.jsx)(s.a,{href:"https://www.w3.org/TR/wai-aria-1.2/#aria-attributes",children:"ARIA attributes"})," and ",(0,i.jsx)(s.a,{href:"https://w3c.github.io/accname/#dfn-accessible-name",children:"accessible name"}),"."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:'// Click a button with accessible name "log in"\nawait page.locator(\'role=button[name="log in"]\').click();\n'})}),"\n",(0,i.jsxs)(s.p,{children:["Read more in ",(0,i.jsx)(s.a,{href:"/docs/locators#locate-by-role",children:"our documentation"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-filter",children:"locator.filter()"})," API to filter an existing locator"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const buttons = page.locator('role=button');\n// ...\nconst submitButton = buttons.filter({ hasText: 'Submit' });\nawait submitButton.click();\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New web-first assertions ",(0,i.jsx)(s.a,{href:"/docs/api/class-pageassertions#page-assertions-to-have-screenshot-1",children:"expect(page).toHaveScreenshot()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-locatorassertions#locator-assertions-to-have-screenshot-1",children:"expect(locator).toHaveScreenshot()"})," that wait for screenshot stabilization and enhances test reliability."]}),"\n",(0,i.jsx)(s.p,{children:"The new assertions has screenshot-specific defaults, such as:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"disables animations"}),"\n",(0,i.jsx)(s.li,{children:"uses CSS scale option"}),"\n"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.goto('https://playwright.dev');\nawait expect(page).toHaveScreenshot();\n"})}),"\n",(0,i.jsxs)(s.p,{children:["The new ",(0,i.jsx)(s.a,{href:"/docs/api/class-pageassertions#page-assertions-to-have-screenshot-1",children:"expect(page).toHaveScreenshot()"})," saves screenshots at the same location as ",(0,i.jsx)(s.a,{href:"/docs/api/class-snapshotassertions#snapshot-assertions-to-match-snapshot-1",children:"expect(value).toMatchSnapshot()"}),"."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-121",children:"Version 1.21"}),"\n",(0,i.jsx)(o.A,{id:"45HZdbmgEw8",title:"Playwright 1.21"}),"\n",(0,i.jsx)(s.h3,{id:"highlights-5",children:"Highlights"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New role selectors that allow selecting elements by their ",(0,i.jsx)(s.a,{href:"https://www.w3.org/TR/wai-aria-1.2/#roles",children:"ARIA role"}),", ",(0,i.jsx)(s.a,{href:"https://www.w3.org/TR/wai-aria-1.2/#aria-attributes",children:"ARIA attributes"})," and ",(0,i.jsx)(s.a,{href:"https://w3c.github.io/accname/#dfn-accessible-name",children:"accessible name"}),"."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:'// Click a button with accessible name "log in"\nawait page.locator(\'role=button[name="log in"]\').click();\n'})}),"\n",(0,i.jsxs)(s.p,{children:["Read more in ",(0,i.jsx)(s.a,{href:"/docs/locators#locate-by-role",children:"our documentation"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.code,{children:"scale"})," option in ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-screenshot",children:"page.screenshot()"})," for smaller sized screenshots."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.code,{children:"caret"})," option in ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-screenshot",children:"page.screenshot()"})," to control text caret. Defaults to ",(0,i.jsx)(s.code,{children:'"hide"'}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New method ",(0,i.jsx)(s.code,{children:"expect.poll"})," to wait for an arbitrary condition:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// Poll the method until it returns an expected result.\nawait expect.poll(async () => {\n  const response = await page.request.get('https://api.example.com');\n  return response.status();\n}).toBe(200);\n"})}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"expect.poll"})," supports most synchronous matchers, like ",(0,i.jsx)(s.code,{children:".toBe()"}),", ",(0,i.jsx)(s.code,{children:".toContain()"}),", etc. Read more in ",(0,i.jsx)(s.a,{href:"/docs/test-assertions#expectpoll",children:"our documentation"}),"."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"behavior-changes-1",children:"Behavior Changes"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["ESM support when running TypeScript tests is now enabled by default. The ",(0,i.jsx)(s.code,{children:"PLAYWRIGHT_EXPERIMENTAL_TS_ESM"})," env variable is no longer required."]}),"\n",(0,i.jsxs)(s.li,{children:["The ",(0,i.jsx)(s.code,{children:"mcr.microsoft.com/playwright"})," docker image no longer contains Python. Please use ",(0,i.jsx)(s.code,{children:"mcr.microsoft.com/playwright/python"})," as a Playwright-ready docker image with pre-installed Python."]}),"\n",(0,i.jsxs)(s.li,{children:["Playwright now supports large file uploads (100s of MBs) via ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-set-input-files",children:"locator.setInputFiles()"})," API."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-39",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 101.0.4951.26"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 98.0.2"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 15.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 100"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 100"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-120",children:"Version 1.20"}),"\n",(0,i.jsx)(o.A,{id:"6vV-XXKsrbA",title:"Playwright 1.20"}),"\n",(0,i.jsx)(s.h3,{id:"highlights-6",children:"Highlights"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New options for methods ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-screenshot",children:"page.screenshot()"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-screenshot",children:"locator.screenshot()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-elementhandle#element-handle-screenshot",children:"elementHandle.screenshot()"}),":"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Option ",(0,i.jsx)(s.code,{children:'animations: "disabled"'})," rewinds all CSS animations and transitions to a consistent state"]}),"\n",(0,i.jsxs)(s.li,{children:["Option ",(0,i.jsx)(s.code,{children:"mask: Locator[]"})," masks given elements, overlaying them with pink ",(0,i.jsx)(s.code,{children:"#FF00FF"})," boxes."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"expect().toMatchSnapshot()"})," now supports anonymous snapshots: when snapshot name is missing, Playwright Test will generate one automatically:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"expect('Web is Awesome <3').toMatchSnapshot();\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.code,{children:"maxDiffPixels"})," and ",(0,i.jsx)(s.code,{children:"maxDiffPixelRatio"})," options for fine-grained screenshot comparison using ",(0,i.jsx)(s.code,{children:"expect().toMatchSnapshot()"}),":"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"expect(await page.screenshot()).toMatchSnapshot({\n  maxDiffPixels: 27, // allow no more than 27 different pixels.\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["It is most convenient to specify ",(0,i.jsx)(s.code,{children:"maxDiffPixels"})," or ",(0,i.jsx)(s.code,{children:"maxDiffPixelRatio"})," once in ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-expect",children:"testConfig.expect"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Playwright Test now adds ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-fully-parallel",children:"testConfig.fullyParallel"})," mode. By default, Playwright Test parallelizes between files. In fully parallel mode, tests inside a single file are also run in parallel. You can also use ",(0,i.jsx)(s.code,{children:"--fully-parallel"})," command line flag."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="playwright.config.ts"',children:"export default {\n  fullyParallel: true,\n};\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-testproject#test-project-grep",children:"testProject.grep"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-testproject#test-project-grep-invert",children:"testProject.grepInvert"})," are now configurable per project. For example, you can now configure smoke tests project using ",(0,i.jsx)(s.code,{children:"grep"}),":"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="playwright.config.ts"',children:"export default {\n  projects: [\n    {\n      name: 'smoke tests',\n      grep: /@smoke/,\n    },\n  ],\n};\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"./trace-viewer",children:"Trace Viewer"})," now shows ",(0,i.jsx)(s.a,{href:"./api-testing",children:"API testing requests"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-highlight",children:"locator.highlight()"})," visually reveals element(s) for easier debugging."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"announcements-4",children:"Announcements"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["We now ship a de
1signated Python docker image ",(0,i.jsx)(s.code,{children:"mcr.microsoft.com/playwright/python"}),". Please switch over to it if you use Python. This is the last release that includes Python inside our javascript ",(0,i.jsx)(s.code,{children:"mcr.microsoft.com/playwright"})," docker image."]}),"\n",(0,i.jsx)(s.li,{children:"v1.20 is the last release to receive WebKit update for macOS 10.15 Catalina. Please update macOS to keep using latest & greatest WebKit!"}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-40",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 101.0.4921.0"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 97.0.1"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 15.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 99"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 99"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-119",children:"Version 1.19"}),"\n",(0,i.jsx)(o.A,{id:"z0EOFvlf14U",title:"Playwright 1.19"}),"\n",(0,i.jsx)(s.h3,{id:"playwright-test-update",children:"Playwright Test Update"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Playwright Test v1.19 now supports ",(0,i.jsx)(s.em,{children:"soft assertions"}),". Failed soft assertions"]}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"do not"})," terminate test execution, but mark the test as failed."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// Make a few checks that will not stop the test when failed...\nawait expect.soft(page.locator('#status')).toHaveText('Success');\nawait expect.soft(page.locator('#eta')).toHaveText('1 day');\n\n// ... and continue the test to check more things.\nawait page.locator('#next-page').click();\nawait expect.soft(page.locator('#title')).toHaveText('Make another order');\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Read more in ",(0,i.jsx)(s.a,{href:"./test-assertions#soft-assertions",children:"our documentation"})]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["You can now specify a ",(0,i.jsx)(s.strong,{children:"custom expect message"})," as a second argument to the ",(0,i.jsx)(s.code,{children:"expect"})," and ",(0,i.jsx)(s.code,{children:"expect.soft"})," functions, for example:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await expect(page.locator('text=Name'), 'should be logged in').toBeVisible();\n"})}),"\n",(0,i.jsx)(s.p,{children:"The error would look like this:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"    Error: should be logged in\n\n    Call log:\n      - expect.toBeVisible with timeout 5000ms\n      - waiting for \"getByText('Name')\"\n\n\n      2 |\n      3 | test('example test', async({ page }) => {\n    > 4 |   await expect(page.locator('text=Name'), 'should be logged in').toBeVisible();\n        |                                                                  ^\n      5 | });\n      6 |\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Read more in ",(0,i.jsx)(s.a,{href:"./test-assertions#custom-expect-message",children:"our documentation"})]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["By default, tests in a single file are run in order. If you have many independent tests in a single file, you can now run them in parallel with ",(0,i.jsx)(s.a,{href:"/docs/api/class-test#test-describe-configure",children:"test.describe.configure()"}),"."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"other-updates",children:"Other Updates"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Locator now supports a ",(0,i.jsx)(s.code,{children:"has"})," option that makes sure it contains another locator inside:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.locator('article', {\n  has: page.locator('.highlight'),\n}).click();\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Read more in ",(0,i.jsx)(s.a,{href:"./api/class-locator#locator-locator",children:"locator documentation"})]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-page",children:"locator.page()"})]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-screenshot",children:"page.screenshot()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-screenshot",children:"locator.screenshot()"})," now automatically hide blinking caret"]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:"Playwright Codegen now generates locators and frame locators"}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New option ",(0,i.jsx)(s.code,{children:"url"}),"  in ",(0,i.jsx)(s.a,{href:"/docs/api/class-testconfig#test-config-web-server",children:"testConfig.webServer"})," to ensure your web server is ready before running the tests"]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New ",(0,i.jsx)(s.a,{href:"/docs/api/class-testinfo#test-info-errors",children:"testInfo.errors"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-testresult#test-result-errors",children:"testResult.errors"}
1)," that contain all failed assertions and soft assertions."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"potentially-breaking-change-in-playwright-test-global-setup",children:"Potentially breaking change in Playwright Test Global Setup"}),"\n",(0,i.jsx)(s.p,{children:"It is unlikely that this change will affect you, no action is required if your tests keep running as they did."}),"\n",(0,i.jsxs)(s.p,{children:["We've noticed that in rare cases, the set of tests to be executed was configured in the global setup by means of the environment variables. We also noticed some applications that were post processing the reporters' output in the global teardown. If you are doing one of the two, ",(0,i.jsx)(s.a,{href:"https://github.com/microsoft/playwright/issues/12018",children:"learn more"})]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-41",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 100.0.4863.0"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 96.0.1"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 15.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 98"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 98"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-118",children:"Version 1.18"}),"\n",(0,i.jsx)(o.A,{id:"ABLYpw2BN_g",title:"Playwright 1.18"}),"\n",(0,i.jsx)(s.h3,{id:"locator-improvements",children:"Locator Improvements"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-drag-to",children:"locator.dragTo()"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-be-checked",children:(0,i.jsx)(s.code,{children:"expect(locator).toBeChecked({ checked })"})})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:"Each locator can now be optionally filtered by the text it contains:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.locator('li', { hasText: 'my item' }).locator('button').click();\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Read more in ",(0,i.jsx)(s.a,{href:"./api/class-locator#locator-locator",children:"locator documentation"})]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"testing-api-improvements",children:"Testing API improvements"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./test-assertions",children:(0,i.jsx)(s.code,{children:"expect(response).toBeOK()"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-testinfo#test-info-attach",children:(0,i.jsx)(s.code,{children:"testInfo.attach()"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-test#test-info",children:(0,i.jsx)(s.code,{children:"test.info()"})})}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"improved-typescript-support",children:"Improved TypeScript Support"}),"\n",(0,i.jsxs)(s.ol,{children:["\n",(0,i.jsxs)(s.li,{children:["Playwright Test now respects ",(0,i.jsx)(s.code,{children:"tsconfig.json"}),"'s ",(0,i.jsx)(s.a,{href:"https://www.typescriptlang.org/tsconfig#baseUrl",children:(0,i.jsx)(s.code,{children:"baseUrl"})})," and ",(0,i.jsx)(s.a,{href:"https://www.typescriptlang.org/tsconfig#paths",children:(0,i.jsx)(s.code,{children:"paths"})}),", so you can use aliases"]}),"\n",(0,i.jsxs)(s.li,{children:["There is a new environment variable ",(0,i.jsx)(s.code,{children:"PW_EXPERIMENTAL_TS_ESM"})," that allows importing ESM modules in your TS code, without the need for the compile step. Don't forget the ",(0,i.jsx)(s.code,{children:".js"})," suffix when you are importing your esm modules. Run your tests as follows:"]}),"\n"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"npm i --save-dev @playwright/[email protected]\nPW_EXPERIMENTAL_TS_ESM=1 npx playwright test\n"})}),"\n",(0,i.jsx)(s.h3,{id:"create-playwright",children:"Create Playwright"}),"\n",(0,i.jsxs)(s.p,{children:["The ",(0,i.jsx)(s.code,{children:"npm init playwright"})," command is now generally available for your use:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-sh",children:"# Run from your project's root directory\nnpm init playwright@latest\n# Or create a new project\nnpm init playwright@latest new-project\n"})}),"\n",(0,i.jsxs)(s.p,{children:["This will create a Playwright Test configuration file, optionally add examples, a GitHub Action workflow and a first test ",(0,i.jsx)(s.code,{children:"example.spec.ts"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"new-apis--changes",children:"New APIs & changes"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["new ",(0,i.jsx)(s.a,{href:"./api/class-testcase#test-case-repeat-each-index",children:(0,i.jsx)(s.code,{children:"testCase.repeatEachIndex"})})," API"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"./api/class-browser#browser-new-context-option-accept-downloads",children:(0,i.jsx)(s.code,{children:"acceptDownloads"})})," option now defaults to ",(0,i.jsx)(s.code,{children:"true"})]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"breaking-change-custom-config-options",children:"Breaking change: custom config options"}),"\n",(0,i.jsxs)(s.p,{children:["Custom config options are a convenient way to parametrize projects with different values. Learn more in ",(0,i.jsx)(s.a,{href:"./test-parameterize#parameterized-projects",children:"this guide"}),"."]}),"\n",(0,i.jsxs)(s.p,{children:["Previously, any fixture introduced through ",(0,i.jsx)(s.a,{href:"/docs/api/class-test#test-extend",children:"test.extend()"})," could be overridden in the ",(0,i.jsx)(s.a,{href:"/docs/api/class-testproject#test-project-use",children:"testProject.use"})," config section. For example,"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// WRONG: THIS SNIPPET DOES NOT WORK SINCE v1.18.\n\n// fixtures.js\nconst test = base.extend({\n  myParameter: 'default',\n});\n\n// playwright.config.js\nmodule.exports = {\n  use: {\n    myParameter: 'value',\n  },\n};\n"})}),"\n",(0,i.jsxs)(s.p,{children:["The proper way to make a fixture parametrized in the config file is to specify ",(0,i.jsx)(s.code,{children:"option: true"})," when defining the fixture. For example,"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// CORRECT: THIS SNIPPET WORKS SINCE v1.18.\n\n// fixtures.js\nconst test = base.extend({\n  // Fixtures marked as \"option: true\" will get a value specified in the config,\n  // or fallback to the default value.\n  myParameter: ['default', { option: true }],\n});\n\n// playwright.config.js\nmodule.exports = {\n  use: {\n    myParameter: 'value',\n  },\n};\n"})}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-42",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 99.0.4812.0"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 95.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 15.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 97"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 97"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-117",children:"Version 1.17"}),"\n",(0,i.jsx)(o.A,{id:"7iyIdeoAP04",title:"Playwright 1.17"}),"\n",(0,i.jsx)(s.h3,{id:"frame-locators",children:"Frame Locators"}),"\n",(0,i.jsxs)(s.p,{children:["Playwright 1.17 introduces ",(0,i.jsx)(s.a,{href:"./api/class-framelocator",children:"frame locators"})," - a locator to the iframe on the page. Frame locators capture the logic sufficient to retrieve the ",(0,i.jsx)(s.code,{children:"iframe"})," and then locate elements in that iframe. Frame locators are strict by default, will wait for ",(0,i.jsx)(s.code,{children:"iframe"})," to appear and can be used in Web-First assertions."]}),"\n",(0,i.jsx)("img",{src:"https://user-images.githubusercontent.com/746130/142082759-2170db38-370d-43ec-8d41-5f9941f57d83.png",alt:"Graphics",width:"600",height:"237"}),"\n",(0,i.jsxs)(s.p,{children:["Frame locators can be created with either ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-frame-locator",children:"page.frameLocator()"})," or ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-frame-locator",children:"locator.frameLocator()"})," method."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const locator = page.frameLocator('#my-iframe').locator('text=Submit');\nawait locator.click();\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Read more at ",(0,i.jsx)(s.a,{href:"./api/class-framelocator",children:"our documentation"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"trace-viewer-update",children:"Trace Viewer Update"}),"\n",(0,i.jsxs)(s.p,{children:["Playwright Trace Viewer is now ",(0,i.jsx)(s.strong,{children:"available online"})," at ",(0,i.jsx)(s.a,{href:"https://trace.playwright.dev",children:"https://trace.playwright.dev"}),"! Just drag-and-drop your ",(0,i.jsx)(s.code,{children:"trace.zip"})," file to inspect its contents."]}),"\n",(0,i.jsxs)(s.blockquote,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.strong,{children:"NOTE"}),": trace files are not uploaded anywhere; ",(0,i.jsx)(s.a,{href:"https://trace.playwright.dev",children:"trace.playwright.dev"})," is a ",(0,i.jsx)(s.a,{href:"https://web.dev/progressive-web-apps/",children:"progressive web application"})," that processes traces locally."]}),"\n"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Playwright Test traces now include sources by default (these could be turned off with tracing option)"}),"\n",(0,i.jsx)(s.li,{children:"Trace Viewer now shows test name"}),"\n",(0,i.jsx)(s.li,{children:"New trace metadata tab with browser details"}),"\n",(0,i.jsx)(s.li,{children:"Snapshots now have URL bar"}),"\n"]}),"\n",(0,i.jsx)("img",{src:"https://user-images.githubusercontent.com/746130/141877831-29e37cd1-e574-4bd9-aab5-b13a463bb4ae.png",alt:"image",width:"2230",height:"1562"}),"\n",(0,i.jsx)(s.h3,{id:"html-report-update",children:"HTML Report Update"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"HTML report now supports dynamic filtering"}),"\n",(0,i.jsxs)(s.li,{children:["Report is now a ",(0,i.jsx)(s.strong,{children:"single static HTML file"}
1)," that could be sent by e-mail or as a slack attachment."]}),"\n"]}),"\n",(0,i.jsx)("img",{src:"https://user-images.githubusercontent.com/746130/141877402-e486643d-72c7-4db3-8844-ed2072c5d676.png",alt:"image",width:"2494",height:"1624"}),"\n",(0,i.jsx)(s.h3,{id:"ubuntu-arm64-support--more",children:"Ubuntu ARM64 support + more"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Playwright now supports ",(0,i.jsx)(s.strong,{children:"Ubuntu 20.04 ARM64"}),". You can now run Playwright tests inside Docker on Apple M1 and on Raspberry Pi."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsx)(s.p,{children:"You can now use Playwright to install stable version of Edge on Linux:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"npx playwright install msedge\n"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"new-apis-20",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Tracing now supports a ",(0,i.jsx)(s.a,{href:"./api/class-tracing#tracing-start-option-title",children:(0,i.jsx)(s.code,{children:"'title'"})})," option"]}),"\n",(0,i.jsxs)(s.li,{children:["Page navigations support a new ",(0,i.jsx)(s.a,{href:"./api/class-page#page-goto",children:(0,i.jsx)(s.code,{children:"'commit'"})})," waiting option"]}),"\n",(0,i.jsxs)(s.li,{children:["HTML reporter got ",(0,i.jsx)(s.a,{href:"./test-reporters#html-reporter",children:"new configuration options"})]}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsxs)(s.a,{href:"./api/class-testconfig#test-config-snapshot-dir",children:[(0,i.jsx)(s.code,{children:"testConfig.snapshotDir"})," option"]})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-testinfo#test-info-parallel-index",children:(0,i.jsx)(s.code,{children:"testInfo.parallelIndex"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-testinfo#test-info-title-path",children:(0,i.jsx)(s.code,{children:"testInfo.titlePath"})})}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"./api/class-testoptions#test-options-trace",children:(0,i.jsx)(s.code,{children:"testOptions.trace"})})," has new options"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-genericassertions",children:(0,i.jsx)(s.code,{children:"expect.toMatchSnapshot"})})," supports subdirectories"]}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-reporter#reporter-prints-to-stdio",children:(0,i.jsx)(s.code,{children:"reporter.printsToStdio()"})})}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-116",children:"Version 1.16"}),"\n",(0,i.jsx)(o.A,{id:"OQKwFDmY64g",title:"Playwright 1.16"}),"\n",(0,i.jsx)(s.h3,{id:"-playwright-test",children:"\u{1F3AD} Playwright Test"}),"\n",(0,i.jsx)(s.h4,{id:"api-testing",children:"API Testing"}),"\n",(0,i.jsxs)(s.p,{children:["Playwright 1.16 introduces new ",(0,i.jsx)(s.a,{href:"./api/class-apirequestcontext",children:"API Testing"})," that lets you send requests to the server directly from Node.js! Now you can:"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"test your server API"}),"\n",(0,i.jsx)(s.li,{children:"prepare server side state before visiting the web application in a test"}),"\n",(0,i.jsx)(s.li,{children:"validate server side post-conditions after running some actions in the browser"}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["To do a request on behalf of Playwright's Page, use ",(0,i.jsxs)(s.strong,{children:["new ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-request",children:"page.request"})," API"]}),":"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"import { test, expect } from '@playwright/test';\n\ntest('context fetch', async ({ page }) => {\n  // Do a GET request on behalf of page\n  const response = await page.request.get('http://example.com/foo.json');\n  // ...\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["To do a stand-alone request from node.js to an API endpoint, use ",(0,i.jsxs)(s.strong,{children:["new ",(0,i.jsxs)(s.a,{href:"./api/class-fixtures#fixtures-request",children:[(0,i.jsx)(s.code,{children:"request"})," fixture"]})]}),":"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"import { test, expect } from '@playwright/test';\n\ntest('context fetch', async ({ request }) =>
1 {\n  // Do a GET request on behalf of page\n  const response = await request.get('http://example.com/foo.json');\n  // ...\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Read more about it in our ",(0,i.jsx)(s.a,{href:"./api-testing",children:"API testing guide"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"response-interception",children:"Response Interception"}),"\n",(0,i.jsxs)(s.p,{children:["It is now possible to do response interception by combining ",(0,i.jsx)(s.a,{href:"./api-testing",children:"API Testing"})," with ",(0,i.jsx)(s.a,{href:"./network#modify-requests",children:"request interception"}),"."]}),"\n",(0,i.jsx)(s.p,{children:"For example, we can blur all the images on the page:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"import { test, expect } from '@playwright/test';\nimport jimp from 'jimp'; // image processing library\n\ntest('response interception', async ({ page }) => {\n  await page.route('**/*.jpeg', async route => {\n    const response = await page._request.fetch(route.request());\n    const image = await jimp.read(await response.body());\n    await image.blur(5);\n    await route.fulfill({\n      response,\n      body: await image.getBufferAsync('image/jpeg'),\n    });\n  });\n  const response = await page.goto('https://playwright.dev');\n  expect(response.status()).toBe(200);\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Read more about ",(0,i.jsx)(s.a,{href:"./network#modify-responses",children:"response interception"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"new-html-reporter",children:"New HTML reporter"}),"\n",(0,i.jsxs)(s.p,{children:["Try it out new HTML reporter with either ",(0,i.jsx)(s.code,{children:"--reporter=html"})," or a ",(0,i.jsx)(s.code,{children:"reporter"})," entry in ",(0,i.jsx)(s.code,{children:"playwright.config.ts"})," file:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"$ npx playwright test --reporter=html\n"})}),"\n",(0,i.jsx)(s.p,{children:"The HTML reporter has all the information about tests and their failures, including surfacing trace and image artifacts."}),"\n",(0,i.jsx)("img",{src:"https://user-images.githubusercontent.com/746130/138324311-94e68b39-b51a-4776-a446-f60037a77f32.png",alt:"html reporter",width:"720",height:"1536"}),"\n",(0,i.jsxs)(s.p,{children:["Read more about ",(0,i.jsx)(s.a,{href:"./test-reporters#html-reporter",children:"our reporters"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"-playwright-library",children:"\u{1F3AD} Playwright Library"}),"\n",(0,i.jsx)(s.h4,{id:"locatorwaitfor",children:"locator.waitFor"}),"\n",(0,i.jsxs)(s.p,{children:["Wait for a locator to resolve to a single element with a given state. Defaults to the ",(0,i.jsx)(s.code,{children:"state: 'visible'"}),"."]}),"\n",(0,i.jsx)(s.p,{children:"Comes especially handy when working with lists:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"import { test, expect } from '@playwright/test';\n\ntest('context fetch', async ({ page }) => {\n  const completeness = page.locator('text=Success');\n  await completeness.waitFor();\n  expect(await page.screenshot()).toMatchSnapshot('screen.png');\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Read more about ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-wait-for",children:"locator.waitFor()"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"docker-support-for-arm64",children:"Docker support for Arm64"}),"\n",(0,i.jsx)(s.p,{children:"Playwright Docker image is now published for Arm64 so it can be used on Apple Silicon."}),"\n",(0,i.jsxs)(s.p,{children:["Read more about ",(0,i.jsx)(s.a,{href:"./docker",children:"Docker integration"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"-playwright-trace-viewer",children:"\u{1F3AD} Playwright Trace Viewer"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"web-first assertions inside trace viewer"}),"\n",(0,i.jsxs)(s.li,{children:["run trace viewer with ",(0,i.jsx)(s.code,{children:"npx playwright show-trace"})," and drop trace files to the trace viewer PWA"]}),"\n",(0,i.jsx)(s.li,{children:"API testing is integrated with trace viewer"}),"\n",(0,i.jsx)(s.li,{children:"better visual attribution of action targets"}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["Read more about ",(0,i.jsx)(s.a,{href:"./trace-viewer",children:"Trace Viewer"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-43",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 97.0.4666.0"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 93.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 15.4"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version of Playwright was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 94"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 94"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-115",children:"Version 1.15"}),"\n",(0,i.jsx)(o.A,{id:"6RwzsDeEj7Y",title:"Playwright 1.15"}),"\n",(0,i.jsx)(s.h3,{id:"-playwright-library-1",children:"\u{1F3AD} Playwright Library"}),"\n",(0,i.jsx)(s.h4,{id:"\uFE0F-mouse-wheel",children:"\u{1F5B1}\uFE0F Mouse Wheel"}),"\n",(0,i.jsxs)(s.p,{children:["By using ",(0,i.jsx)(s.a,{href:"/docs/api/class-mouse#mouse-wheel",children:"mouse.wheel()"})," you are now able to scroll vertically or horizontally."]}),"\n",(0,i.jsx)(s.h4,{id:"-new-headers-api",children:"\u{1F4DC} New Headers API"}),"\n",(0,i.jsx)(s.p,{children:"Previously it was not possible to get multiple header values of a response. This is now  possible and additional helper functions are available:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-request#request-all-headers",children:"request.allHeaders()"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-request#request-headers-array",children:"request.headersArray()"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-request#request-header-value",children:"request.headerValue()"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-response#response-all-headers",children:"response.allHeaders()"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-response#response-headers-array",children:"response.headersArray()"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-response#response-header-value",children:"response.headerValue()"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-response#response-header-values",children:"response.headerValues()"})}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"-forced-colors-emulation",children:"\u{1F308} Forced-Colors emulation"}),"\n",(0,i.jsxs)(s.p,{children:["Its now possible to emulate the ",(0,i.jsx)(s.code,{children:"forced-colors"})," CSS media feature by passing it in the ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-new-context",children:"browser.newContext()"})," or calling ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-emulate-media",children:"page.emulateMedia()"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"new-apis-21",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-route",children:"page.route()"})," accepts new ",(0,i.jsx)(s.code,{children:"times"})," option to specify how many times this route should be matched."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-set-checked",children:"page.setChecked()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-locator#locator-set-checked",children:"locator.setChecked()"})," were introduced to set the checked state of a checkbox."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-request#request-sizes",children:"request.sizes()"})," Returns resource size information for given http request."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-tracing#tracing-start-chunk",children:"tracing.startChunk()"})," - Start a new trace chunk."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-tracing#tracing-stop-chunk",children:"tracing.stopChunk()"})," - Stops a new trace chunk."]}),"\n"]}),"\n",(0,i.jsx)(s.h3,{id:"-playwright-test-1",children:"\u{1F3AD} Playwright Test"}),"\n",(0,i.jsxs)(s.h4,{id:"-testparallel-run-tests-in-the-same-file-in-parallel",children:["\u{1F91D} ",(0,i.jsx)(s.code,{children:"test.parallel()"})," run tests in the same file in parallel"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"test.describe.parallel('group', () => {\n  test('runs in parallel 1', async ({ page }) =>
1 {\n  });\n  test('runs in parallel 2', async ({ page }) => {\n  });\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["By default, tests in a single file are run in order. If you have many independent tests in a single file, you can now run them in parallel with ",(0,i.jsx)(s.a,{href:"./api/class-test#test-describe-parallel",children:"test.describe.parallel(title, callback)"}),"."]}),"\n",(0,i.jsxs)(s.h4,{id:"-add---debug-cli-flag",children:["\u{1F6E0} Add ",(0,i.jsx)(s.code,{children:"--debug"})," CLI flag"]}),"\n",(0,i.jsxs)(s.p,{children:["By using ",(0,i.jsx)(s.code,{children:"npx playwright test --debug"})," it will enable the ",(0,i.jsx)(s.a,{href:"./debug#playwright-inspector",children:"Playwright Inspector"})," for you to debug your tests."]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-44",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 96.0.4641.0"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 92.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 15.0"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-114",children:"Version 1.14"}),"\n",(0,i.jsx)(o.A,{id:"LczBDR0gOhk",title:"Playwright 1.14"}),"\n",(0,i.jsx)(s.h3,{id:"-playwright-library-2",children:"\u{1F3AD} Playwright Library"}),"\n",(0,i.jsx)(s.h4,{id:"\uFE0F-new-strict-mode",children:'\u26A1\uFE0F New "strict" mode'}),"\n",(0,i.jsxs)(s.p,{children:["Selector ambiguity is a common problem in automation testing. ",(0,i.jsx)(s.strong,{children:'"strict" mode'})," ensures that your selector points to a single element and throws otherwise."]}),"\n",(0,i.jsxs)(s.p,{children:["Pass ",(0,i.jsx)(s.code,{children:"strict: true"})," into your action calls to opt in."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// This will throw if you have more than one button!\nawait page.click('button', { strict: true });\n"})}),"\n",(0,i.jsxs)(s.h4,{id:"-new-locators-api",children:["\u{1F4CD} New ",(0,i.jsx)(s.a,{href:"./api/class-locator",children:(0,i.jsx)(s.strong,{children:"Locators API"})})]}),"\n",(0,i.jsx)(s.p,{children:"Locator represents a view to the element(s) on the page. It captures the logic sufficient to retrieve the element at any given moment."}),"\n",(0,i.jsxs)(s.p,{children:["The difference between the ",(0,i.jsx)(s.a,{href:"./api/class-locator",children:"Locator"})," and ",(0,i.jsx)(s.a,{href:"./api/class-elementhandle",children:"ElementHandle"})," is that the latter points to a particular element, while ",(0,i.jsx)(s.a,{href:"./api/class-locator",children:"Locator"})," captures the logic of how to retrieve that element."]}),"\n",(0,i.jsxs)(s.p,{children:["Also, locators are ",(0,i.jsx)(s.strong,{children:'"strict" by default'}),"!"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const locator = page.locator('button');\nawait locator.click();\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Learn more in the ",(0,i.jsx)(s.a,{href:"./api/class-locator",children:"documentation"}),"."]}),"\n",(0,i.jsxs)(s.h4,{id:"-experimental-react-and-vue-selector-engines",children:["\u{1F9E9} Experimental ",(0,i.jsx)(s.a,{href:"/docs/other-locators",children:(0,i.jsx)(s.strong,{children:"React"})})," and ",(0,i.jsx)(s.a,{href:"/docs/other-locators",children:(0,i.jsx)(s.strong,{children:"Vue"})})," selector engines"]}),"\n",(0,i.jsxs)(s.p,{children:["React and Vue selectors allow selecting elements by its component name and/or property values. The syntax is very similar to ",(0,i.jsx)(s.a,{href:"https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors",children:"attribute selectors"})," and supports all attribute selector operators."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await page.locator('_react=SubmitButton[enabled=true]').click();\nawait page.locator('_vue=submit-button[enabled=true]').click();\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Learn more in the ",(0,i.jsx)(s.a,{href:"/docs/other-locators",children:"react selectors documentation"})," and the ",(0,i.jsx)(s.a,{href:"/docs/other-locators",children:"vue selectors documentation"}),"."]}),"\n",(0,i.jsxs)(s.h4,{id:"-new-nth-and-visible-selector-engines",children:["\u2728 New ",(0,i.jsx)(s.a,{href:"/docs/other-locators#n-th-element-locator",children:(0,i.jsx)(s.strong,{children:(0,i.jsx)(s.code,{children:"nth"})})})," and ",(0,i.jsx)(s.a,{href:"/docs/other-locators#css-matching-only-visible-elements",children:(0,i.jsx)(s.strong,{children:(0,i.jsx)(s.code,{children:"visible"})})})," selector engines"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/other-locators#n-th-element-locator",children:(0,i.jsx)(s.code,{children:"nth"})})," selector engine is equivalent to the ",(0,i.jsx)(s.code,{children:":nth-match"})," pseudo class, but could be combined with other selector engines."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/other-locators#css-matching-only-visible-elements",children:(0,i.jsx)(s.code,{children:"visible"})})," selector engine is equivalent to the ",(0,i.jsx)(s.code,{children:":visible"})," pseudo class, but could be combined with other selector engines."]}),"\n"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"// select the first button among all buttons\nawait button.click('button >> nth=0');\n// or if you are using locators, you can use first(), nth() and last()\nawait page.locator('button').first().click();\n\n// click a visible button\nawait button.click('button >> visible=true');\n"})}),"\n",(0,i.jsx)(s.h3,{id:"-playwright-test-2",children:"\u{1F3AD} Playwright Test"}),"\n",(0,i.jsx)(s.h4,{id:"-web-first-assertions",children:"\u2705 Web-First Assertions"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.code,{children:"expect"})," now supports lots of new web-first assertions."]}),"\n",(0,i.jsx)(s.p,{children:"Consider the following example:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"await expect(page.locator('.status')).toHaveText('Submitted');\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Playwright Test will be re-testing the node with the selector ",(0,i.jsx)(s.code,{children:".status"})," until fetched Node has the ",(0,i.jsx)(s.code,{children:'"Submitted"'})," text. It will be re-fetching the node and checking it over and over, until the condition is met or until the timeout is reached. You can either pass this timeout or configure it once via the ",(0,i.jsx)(s.a,{href:"./api/class-testproject#test-project-expect",children:(0,i.jsx)(s.code,{children:"testProject.expect"})}
1)," value in test config."]}),"\n",(0,i.jsx)(s.p,{children:"By default, the timeout for assertions is not set, so it'll wait forever, until the whole test times out."}),"\n",(0,i.jsx)(s.p,{children:"List of all new assertions:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-be-checked",children:(0,i.jsx)(s.code,{children:"expect(locator).toBeChecked()"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-be-disabled",children:(0,i.jsx)(s.code,{children:"expect(locator).toBeDisabled()"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-be-editable",children:(0,i.jsx)(s.code,{children:"expect(locator).toBeEditable()"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-be-empty",children:(0,i.jsx)(s.code,{children:"expect(locator).toBeEmpty()"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-be-enabled",children:(0,i.jsx)(s.code,{children:"expect(locator).toBeEnabled()"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-be-focused",children:(0,i.jsx)(s.code,{children:"expect(locator).toBeFocused()"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-be-hidden",children:(0,i.jsx)(s.code,{children:"expect(locator).toBeHidden()"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-be-visible",children:(0,i.jsx)(s.code,{children:"expect(locator).toBeVisible()"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-contain-text",children:(0,i.jsx)(s.code,{children:"expect(locator).toContainText(text, options?)"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-have-attribute",children:(0,i.jsx)(s.code,{children:"expect(locator).toHaveAttribute(name, value)"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-have-class",children:(0,i.jsx)(s.code,{children:"expect(locator).toHaveClass(expected)"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-have-count",children:(0,i.jsx)(s.code,{children:"expect(locator).toHaveCount(count)"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-have-css",children:(0,i.jsx)(s.code,{children:"expect(locator).toHaveCSS(name, value)"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-have-id",children:(0,i.jsx)(s.code,{children:"expect(locator).toHaveId(id)"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-have-js-property",children:(0,i.jsx)(s.code,{children:"expect(locator).toHaveJSProperty(name, value)"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-have-text",children:(0,i.jsx)(s.code,{children:"expect(locator).toHaveText(expected, options)"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-pageassertions#page-assertions-to-have-title",children:(0,i.jsx)(s.code,{children:"expect(page).toHaveTitle(title)"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-pageassertions#page-assertions-to-have-url",children:(0,i.jsx)(s.code,{children:"expect(page).toHaveURL(url)"})})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"./api/class-locatorassertions#locator-assertions-to-have-value",children:(0,i.jsx)(s.code,{children:"expect(locator).toHaveValue(value)"})})}),"\n"]}),"\n",(0,i.jsxs)(s.h4,{id:"-serial-mode-with-describeserial",children:["\u26D3 Serial mode with ",(0,i.jsx)(s.a,{href:"./api/class-test#test-describe-serial",children:(0,i.jsx)(s.code,{children:"describe.serial"})})]}),"\n",(0,i.jsx)(s.p,{children:"Declares a group of tests that should always be run serially. If one of the tests fails, all subsequent tests are skipped. All tests in a group are retried together."}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"test.describe.serial('group', () => {\n  test('runs first', async ({ page }) => { /* ... */ });\n  test('runs second', async ({ page }) => { /* ... */ });\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Learn more in the ",(0,i.jsx)(s.a,{href:"./api/class-test#test-describe-serial",children:"documentation"}),"."]}),"\n",(0,i.jsxs)(s.h4,{id:"-steps-api-with-teststep",children:["\u{1F43E} Steps API with ",(0,i.jsx)(s.a,{href:"./api/class-test#test-step",children:(0,i.jsx)(s.code,{children:"test.
1step"})})]}),"\n",(0,i.jsxs)(s.p,{children:["Split long tests into multiple steps using ",(0,i.jsx)(s.code,{children:"test.step()"})," API:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"import { test, expect } from '@playwright/test';\n\ntest('test', async ({ page }) => {\n  await test.step('Log in', async () => {\n    // ...\n  });\n  await test.step('news feed', async () => {\n    // ...\n  });\n});\n"})}),"\n",(0,i.jsx)(s.p,{children:"Step information is exposed in reporters API."}),"\n",(0,i.jsx)(s.h4,{id:"-launch-web-server-before-running-tests",children:"\u{1F30E} Launch web server before running tests"}),"\n",(0,i.jsxs)(s.p,{children:["To launch a server during the tests, use the ",(0,i.jsx)(s.a,{href:"./test-webserver",children:(0,i.jsx)(s.code,{children:"webServer"})})," option in the configuration file. The server will wait for a given url to be available before running the tests, and the url will be passed over to Playwright as a ",(0,i.jsx)(s.a,{href:"./api/class-testoptions#test-options-base-url",children:(0,i.jsx)(s.code,{children:"baseURL"})})," when creating a context."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",metastring:'title="playwright.config.ts"',children:"import { defineConfig } from '@playwright/test';\nexport default defineConfig({\n  webServer: {\n    command: 'npm run start', // command to launch\n    url: 'http://127.0.0.1:3000', // url to await for\n    timeout: 120 * 1000,\n    reuseExistingServer: !process.env.CI,\n  },\n});\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Learn more in the ",(0,i.jsx)(s.a,{href:"./test-webserver",children:"documentation"}),"."]}),"\n",(0,i.jsx)(s.h3,{id:"browser-versions-45",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 94.0.4595.0"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 91.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 15.0"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-113",children:"Version 1.13"}),"\n",(0,i.jsx)(s.h4,{id:"playwright-test",children:"Playwright Test"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsxs)(s.strong,{children:["\u26A1\uFE0F Introducing ",(0,i.jsx)(s.a,{href:"https://github.com/microsoft/playwright/blob/65a9037461ffc15d70cdc2055832a0c5512b227c/packages/playwright-test/types/testReporter.d.ts",children:"Reporter API"})]})," which is already used to create an ",(0,i.jsx)(s.a,{href:"https://github.com/allure-framework/allure-js/pull/297",children:"Allure Playwright reporter"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsxs)(s.strong,{children:["\u26FA\uFE0F New ",(0,i.jsxs)(s.a,{href:"./test-configuration#basic-configuration",children:[(0,i.jsx)(s.code,{children:"baseURL"})," fixture"]})]})," to support relative paths in tests."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"playwright",children:"Playwright"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"\u{1F596} Programmatic drag-and-drop support"})," via the ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-drag-and-drop",children:"page.dragAndDrop()"})," API."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"\u{1F50E} Enhanced HAR"})," with body sizes for requests and responses. Use via ",(0,i.jsx)(s.code,{children:"recordHar"})," option in ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-new-context",children:"browser.newContext()"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"tools",children:"Tools"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["Playwright Trace Viewer now shows parameters, returned values and ",(0,i.jsx)(s.code,{children:"console.log()"})," calls."]}),"\n",(0,i.jsx)(s.li,{children:"Playwright Inspector can generate Playwright Test tests."}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"new-and-overhauled-guides",children:"New and Overhauled Guides"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/intro",children:"Intro"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/auth",children:"Authentication"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/chrome-extensions",children:"Chrome Extensions"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/test-annotations",children:"Playwright Test Annotations"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/test-configuration",children:"Playwright Test Configuration"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/test-fixtures",children:"Playwright Test Fixtures"})}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"browser-versions-46",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 93.0.4576.0"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 90.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 14.2"}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"new-playwright-apis",children:"New Playwright APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["new ",(0,i.jsx)(s.code,{children:"baseURL"})," option in ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-new-context",children:"browser.newContext()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-new-page",children:"browser.newPage()"})]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-response#response-security-details",children:"response.securityDetails()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-response#response-server-addr",children:"response.serverAddr()"})]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-drag-and-drop",children:"page.dragAndDrop()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-frame#frame-drag-and-drop",children:"frame.dragAndDrop()"})]}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-download#download-cancel",children:"download.cancel()"})}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-input-value",children:"page.inputValue()"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-frame#frame-input-value",children:"frame.inputValue()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-elementhandle#element-handle-input-value",children:"elementHandle.inputValue()"})]}),"\n",(0,i.jsxs)(s.li,{children:["new ",(0,i.jsx)(s.code,{children:"force"})," option in ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-fill",children:"page.fill()"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-frame#frame-fill",children:"frame.fill()"}),", and ",(0,i.jsx)(s.a,{href:"/docs/api/class-elementhandle#element-handle-fill",children:"elementHandle.fill()"})]}),"\n",(0,i.jsxs)(s.li,{children:["new ",(0,i.jsx)(s.code,{children:"force"})," option in ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-select-option",children:"page.selectOption()"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-frame#frame-select-option",children:"frame.selectOption()"}),", and ",(0,i.jsx)(s.a,{href:"/docs/api/class-elementhandle#element-handle-select-option",children:"elementHandle.selectOption()"})]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-112",children:"Version 1.12"}),"\n",(0,i.jsx)(s.h4,{id:"\uFE0F-introducing-playwright-test",children:"\u26A1\uFE0F Introducing Playwright Test"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/intro",children:"Playwright Test"})," is a ",(0,i.jsx)(s.strong,{children:"new test runner"})," built from scratch by Playwright team specifically to accommodate end-to-e
1nd testing needs:"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Run tests across all browsers."}),"\n",(0,i.jsx)(s.li,{children:"Execute tests in parallel."}),"\n",(0,i.jsx)(s.li,{children:"Enjoy context isolation and sensible defaults out of the box."}),"\n",(0,i.jsx)(s.li,{children:"Capture videos, screenshots and other artifacts on failure."}),"\n",(0,i.jsx)(s.li,{children:"Integrate your POMs as extensible fixtures."}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"Installation:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"npm i -D @playwright/test\n"})}),"\n",(0,i.jsxs)(s.p,{children:["Simple test ",(0,i.jsx)(s.code,{children:"tests/foo.spec.ts"}),":"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"import { test, expect } from '@playwright/test';\n\ntest('basic test', async ({ page }) => {\n  await page.goto('https://playwright.dev/');\n  const name = await page.innerText('.navbar__title');\n  expect(name).toBe('Playwright');\n});\n"})}),"\n",(0,i.jsx)(s.p,{children:"Running:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"npx playwright test\n"})}),"\n",(0,i.jsxs)(s.p,{children:["\u{1F449}  Read more in ",(0,i.jsx)(s.a,{href:"/docs/intro",children:"Playwright Test documentation"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"\uFE0F-introducing-playwright-trace-viewer",children:"\u{1F9DF}\u200D\u2642\uFE0F Introducing Playwright Trace Viewer"}),"\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/trace-viewer",children:"Playwright Trace Viewer"})," is a new GUI tool that helps exploring recorded Playwright traces after the script ran. Playwright traces let you examine:"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"page DOM before and after each Playwright action"}),"\n",(0,i.jsx)(s.li,{children:"page rendering before and after each Playwright action"}),"\n",(0,i.jsx)(s.li,{children:"browser network during script execution"}),"\n"]}),"\n",(0,i.jsxs)(s.p,{children:["Traces are recorded using the new ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-tracing",children:"browserContext.tracing"})," API:"]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-js",children:"const browser = await chromium.launch();\nconst context = await browser.newContext();\n\n// Start tracing before creating / navigating a page.\nawait context.tracing.start({ screenshots: true, snapshots: true });\n\nconst page = await context.newPage();\nawait page.goto('https://playwright.dev');\n\n// Stop tracing and export it into a zip archive.\nawait context.tracing.stop({ path: 'trace.zip' });\n"})}),"\n",(0,i.jsx)(s.p,{children:"Traces are examined later with the Playwright CLI:"}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-sh",children:"npx playwright show-trace trace.zip\n"})}),"\n",(0,i.jsx)(s.p,{children:"That will open the following GUI:"}),"\n",(0,i.jsx)("img",{src:"https://user-images.githubusercontent.com/746130/121109654-d66c4480-c7c0-11eb-8d4d-eb70d2b03811.png",alt:"image",width:"2424",height:"1544"}),"\n",(0,i.jsxs)(s.p,{children:["\u{1F449} Read more in ",(0,i.jsx)(s.a,{href:"/docs/trace-viewer",children:"trace viewer documentation"}),"."]}),"\n",(0,i.jsx)(s.h4,{id:"browser-versions-47",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 93.0.4530.0"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 89.0"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 14.2"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version of Playwright was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 91"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 91"}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"new-apis-22",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"reducedMotion"})," option in ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-emulate-media",children:"page.emulateMedia()"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsertype#browser-type-launch-persistent-context",children:"browserType.launchPersistentContext()"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-new-context",children:"browser.newContext()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-new-page",children:"browser.newPage()"})]}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-event-request",children:"browserContext.on('request')"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-event-request-failed",children:"browserContext.on('requestfailed')"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-event-request-finished",children:"browserContext.on('requestfinished')"})}),"\n",(0,i.jsx)(s.li,{children:(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-event-response",children:"browserContext.on('response')"})}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"tracesDir"})," option in ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsertype#browser-type-launch",children:"browserType.launch()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsertype#browser-type-launch-persistent-context",children:"browserType.launchPersistentContext()"})]}),"\n",(0,i.jsxs)(s.li,{children:["new ",(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-tracing",children:"browserContext.tracing"})," API namespace"]}),"\n",(0,i.jsxs)(s.li,{children:["new ",(0,i.jsx)(s.a,{href:"/docs/api/class-download#download-page",children:"download.page(
1)"})," method"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-111",children:"Version 1.11"}),"\n",(0,i.jsxs)(s.p,{children:["\u{1F3A5}  New video: ",(0,i.jsx)(s.a,{href:"https://youtu.be/_Jla6DyuEu4",children:"Playwright: A New Test Automation Framework for the Modern Web"})," (",(0,i.jsx)(s.a,{href:"https://docs.google.com/presentation/d/1xFhZIJrdHkVe2CuMKOrni92HoG2SWslo0DhJJQMR1DI/edit?usp=sharing",children:"slides"}),")"]}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"We talked about Playwright"}),"\n",(0,i.jsx)(s.li,{children:"Showed engineering work behind the scenes"}),"\n",(0,i.jsx)(s.li,{children:"Did live demos with new features \u2728"}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Special thanks"})," to ",(0,i.jsx)(s.a,{href:"http://applitools.com/",children:"applitools"})," for hosting the event and inviting us!"]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"browser-versions-48",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 92.0.4498.0"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 89.0b6"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 14.2"}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"new-apis-23",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["support for ",(0,i.jsx)(s.strong,{children:"async predicates"})," across the API in methods such as ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-wait-for-request",children:"page.waitForRequest()"})," and others"]}),"\n",(0,i.jsxs)(s.li,{children:["new ",(0,i.jsx)(s.strong,{children:"emulation devices"}),": Galaxy S8, Galaxy S9+, Galaxy Tab S4, Pixel 3, Pixel 4"]}),"\n",(0,i.jsxs)(s.li,{children:["new methods:","\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-wait-for-url",children:"page.waitForURL()"})," to await navigations to URL"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-video#video-delete",children:"video.delete()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-video#video-save-as",children:"video.saveAs()"})," to manage screen recording"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["new options:","\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"screen"})," option in the ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-new-context",children:"browser.newContext()"})," method to emulate ",(0,i.jsx)(s.code,{children:"window.screen"})," dimensions"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"position"})," option in ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-check",children:"page.check()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-uncheck",children:"page.uncheck()"})," methods"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"trial"})," option to dry-run actions in ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-check",children:"page.check()"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-uncheck",children:"page.uncheck()"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-click",children:"page.click()"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-dblclick",children:"page.dblclick()"}),", ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-hover",children:"page.hover()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-tap",children:"page.tap()"})]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-110",children:"Version 1.10"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"https://github.com/microsoft/playwright-java",children:"Playwright for Java v1.10"})," is ",(0,i.jsx)(s.strong,{children:"now stable"}),"!"]}),"\n",(0,i.jsxs)(s.li,{children:["Run Playwright against ",(0,i.jsx)(s.strong,{children:"Google Chrome"})," and ",(0,i.jsx)(s.strong,{children:"Microsoft Edge"})," stable channels with the ",(0,i.jsx)(s.a,{href:"./browsers",children:"new channels API"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["Chromium screenshots are ",(0,i.jsx)(s.strong,{children:"fast"})," on Mac & Windows."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"bundled-browser-versions",children:"Bundled Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 90.0.4430.0"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 87.0b10"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 14.2"}),"\n"]}),"\n",(0,i.jsx)(s.p,{children:"This version of Playwright was also tested against the following stable channels:"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Google Chrome 89"}),"\n",(0,i.jsx)(s.li,{children:"Microsoft Edge 89"}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"new-apis-24",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-browsertype#browser-type-launch",children:"browserType.launch()"})," now accepts the new ",(0,i.jsx)(s.code,{children:"'channel'"})," option. Read more in ",(0,i.jsx)(s.a,{href:"./browsers",children:"our documentation"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-19",children:"Version 1.9"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/debug",children:"Playwright Inspector"})," is a ",(0,i.jsx)(s.strong,{children:"new GUI tool"})," to author and debug your tests.","\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Line-by-line debugging"})," of your Playwright scripts, with play, pause and step-through."]}),"\n",(0,i.jsxs)(s.li,{children:["Author new scripts by ",(0,i.jsx)(s.strong,{children:"recording user actions"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Generate element selectors"})," for your script by hovering over elements."]}),"\n",(0,i.jsxs)(s.li,{children:["Set the ",(0,i.jsx)(s.code,{children:"PWDEBUG=1"})," environment variable to launch the Inspector"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Pause script execution"})," with ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-pause",children:"page.pause()"})," in headed mode. Pausing the page launches ",(0,i.jsx)(s.a,{href:"/docs/debug",children:"Playwright Inspector"})," for debugging."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"New has-text pseudo-class"})," for CSS selectors. ",(0,i.jsx)(s.code,{children:':has-text("example")'})," matches any element containing ",(0,i.jsx)(s.code,{children:'"example"'})," somewhere inside, possibly in a child or a descendant element. See ",(0,i.jsx)(s.a,{href:"/docs/other-locators#css-matching-by-text",children:"more examples"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Page dialogs are now auto-dismissed"})," during execution, unless a listener for ",(0,i.jsx)(s.code,{children:"dialog"})," event is configured. ",(0,i.jsx)(s.a,{href:"/docs/dialogs",children:"Learn more"})," about this."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"https://github.com/microsoft/playwright-python",children:"Playwright for Python"})," is ",(0,i.jsx)(s.strong,{children:"now stable"})," with an idiomatic snake case API and pre-built ",(0,i.jsx)(s.a,{href:"/docs/docker",children:"Docker image"})," to run tests in CI/CD."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"browser-versions-49",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 90.0.4421.0"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 86.0b10"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 14.1"}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"new-apis-25",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-pause",children:"page.pause()"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-18",children:"Version 1.8"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/other-locators#css-matching-elements-based-on-layout",children:"Selecting elements based on layout"}
1)," with ",(0,i.jsx)(s.code,{children:":left-of()"}),", ",(0,i.jsx)(s.code,{children:":right-of()"}),", ",(0,i.jsx)(s.code,{children:":above()"})," and ",(0,i.jsx)(s.code,{children:":below()"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["Playwright now includes ",(0,i.jsx)(s.a,{href:"/docs/test-cli",children:"command line interface"}),", former playwright-cli."]}),"\n",(0,i.jsx)(s.pre,{children:(0,i.jsx)(s.code,{className:"language-bash",children:"npx playwright --help\n"})}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-select-option",children:"page.selectOption()"})," now waits for the options to be present."]}),"\n"]}),"\n",(0,i.jsxs)(s.li,{children:["\n",(0,i.jsxs)(s.p,{children:["New methods to ",(0,i.jsx)(s.a,{href:"./actionability#assertions",children:"assert element state"})," like ",(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-is-editable",children:"page.isEditable()"}),"."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"new-apis-26",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-elementhandle#element-handle-is-checked",children:"elementHandle.isChecked()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-elementhandle#element-handle-is-disabled",children:"elementHandle.isDisabled()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-elementhandle#element-handle-is-editable",children:"elementHandle.isEditable()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-elementhandle#element-handle-is-enabled",children:"elementHandle.isEnabled()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-elementhandle#element-handle-is-hidden",children:"elementHandle.isHidden()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-elementhandle#element-handle-is-visible",children:"elementHandle.isVisible()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-is-checked",children:"page.isChecked()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-is-disabled",children:"page.isDisabled()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-is-editable",children:"page.isEditable()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-is-enabled",children:"page.isEnabled()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-is-hidden",children:"page.isHidden()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-page#page-is-visible",children:"page.isVisible()"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:["New option ",(0,i.jsx)(s.code,{children:"'editable'"})," in ",(0,i.jsx)(s.a,{href:"/docs/api/class-elementhandle#element-handle-wait-for-element-state",children:"elementHandle.waitForElementState()"}),"."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"browser-versions-50",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 90.0.4392.0"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 85.0b5"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 14.1"}),"\n"]}),"\n",(0,i.jsx)(s.h2,{id:"version-17",children:"Version 1.7"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"New Java SDK"}),": ",(0,i.jsx)(s.a,{href:"https://github.com/microsoft/playwright-java",children:"Playwright for Java"})," is now on par with ",(0,i.jsx)(s.a,{href:"https://github.com/microsoft/playwright",children:"JavaScript"}),", ",(0,i.jsx)(s.a,{href:"https://github.com/microsoft/playwright-python",children:"Python"})," and ",(0,i.jsx)(s.a,{href:"https://github.com/microsoft/playwright-dotnet",children:".NET bindings"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Browser storage API"}),": New convenience APIs to save and load browser storage state (cookies, local storage) to simplify automation scenarios with authentication."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"New CSS selectors"}),": We heard your feedback for more flexible selectors and have revamped the selectors implementation. Playwright 1.7 introduces ",(0,i.jsx)(s.a,{href:"/docs/other-locators#css-locator",children:"new CSS extensions"})," and there's more coming soon."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"New website"}),": The docs website at ",(0,i.jsx)(s.a,{href:"https://playwright.dev/",children:"playwright.dev"})," has been updated and is now built with ",(0,i.jsx)(s.a,{href:"https://v2.docusaurus.io/",children:"Docusaurus"}),"."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.strong,{children:"Support for Apple Silicon"}),": Playwright browser binaries for WebKit and Chromium are now built for Apple Silicon."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"new-apis-27",children:"New APIs"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.a,{href:"/docs/api/class-browsercontext#browser-context-storage-state",children:"browserContext.storageState()"})," to get current state for later reuse."]}),"\n",(0,i.jsxs)(s.li,{children:[(0,i.jsx)(s.code,{children:"storageState"})," option in ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-new-context",children:"browser.newContext()"})," and ",(0,i.jsx)(s.a,{href:"/docs/api/class-browser#browser-new-page",children:"browser.newPage()"})," to setup browser context state."]}),"\n"]}),"\n",(0,i.jsx)(s.h4,{id:"browser-versions-51",children:"Browser Versions"}),"\n",(0,i.jsxs)(s.ul,{children:["\n",(0,i.jsx)(s.li,{children:"Chromium 89.0.4344.0"}),"\n",(0,i.jsx)(s.li,{children:"Mozilla Firefox 84.0b9"}),"\n",(0,i.jsx)(s.li,{children:"WebKit 14.1"}),"\n"]})]})}function p(e={}){let{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,i.jsx)(s,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},88467(e,s,n){n.d(s,{A:()=>r});let r=n.p+"assets/images/cft-logo-change-e6c83cd629c1cf92a7856fe6e42ab80a.png"},78344(e,s,n){n.d(s,{A:()=>r});let r=n.p+"assets/images/speedboard-a8fe4e48388f4075fdd70e83d2b53e7a.png"},24314(e,s,n){n.d(s,{A:()=>r});let r=n.p+"assets/images/timeline-c64690807d029b6c866269c319aa5b7b.png"}
1,21588(e,s,n){n.d(s,{A:()=>a});var r=n(74848),i=n(96540),t=function(){return(t=Object.assign||function(e){for(var s,n=1,r=arguments.length;n<r;n++)for(var i in s=arguments[n])Object.prototype.hasOwnProperty.call(s,i)&&(e[i]=s[i]);return e}).apply(this,arguments)},o=i.forwardRef(function(e,s){var n=i.useState(!1),r=n[0],o=n[1],a=i.useState(!1),l=a[0],c=a[1],d=encodeURIComponent(e.id),h="string"==typeof e.playlistCoverId?encodeURIComponent(e.playlistCoverId):null,p=e.title,x=e.poster||"hqdefault",j="&".concat(e.params)||"",g=e.muted?"&mute=1":"",u=e.announce||"Watch",w=e.webp?"webp":"jpg",m=e.webp?"vi_webp":"vi",f=e.thumbnail||(e.playlist?"https://i.ytimg.com/".concat(m,"/").concat(h,"/").concat(x,".").concat(w):"https://i.ytimg.com/".concat(m,"/").concat(d,"/").concat(x,".").concat(w)),v=e.noCookie?"https://www.youtube-nocookie.com":"https://www.youtube.com";v=e.cookie?"https://www.youtube.com":"https://www.youtube-nocookie.com";var b=e.playlist?"".concat(v,"/embed/videoseries?autoplay=1").concat(g,"&list=").concat(d).concat(j):"".concat(v,"/embed/").concat(d,"?autoplay=1&state=1").concat(g).concat(j),y=e.activatedClass||"lyt-activated",k=e.adNetwork||!1,C=e.aspectHeight||9,N=e.aspectWidth||16,P=e.iframeClass||"",T=e.playerClass||"lty-playbtn",A=e.wrapperClass||"yt-lite",I=e.onIframeAdded||function(){},S=e.rel?"prefetch":"preload",M=e.containerElement||"article";return i.useEffect(function(){l&&I()},[l]),i.createElement(i.Fragment,null,i.createElement("link",{rel:S,href:f,as:"image"}),i.createElement(i.Fragment,null,r&&i.createElement(i.Fragment,null,i.createElement("link",{rel:"preconnect",href:v}),i.createElement("link",{rel:"preconnect",href:"https://www.google.com"}),k&&i.createElement(i.Fragment,null,i.createElement("link",{rel:"preconnect",href:"https://static.doubleclick.net"}),i.createElement("link",{rel:"preconnect",href:"https://googleads.g.doubleclick.net"})))),i.createElement(M,{onPointerOver:function(){r||o(!0)},onClick:function(){l||c(!0)},className:"".concat(A," ").concat(l?y:""),"data-title":p,style:t({backgroundImage:"url(".concat(f,")")},{"--aspect-ratio":"".concat(C/N*100,"%")})},i.createElement("button",{type:"button",className:T,"aria-label":"".concat(u," ").concat(p)}),l&&i.createElement("iframe",{ref:s,className:P,title:p,width:"560",height:"315",frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,src:b})))});let a=function(e){let{id:s,title:n,thumbnail:i}=e;return(0,r.jsx)("div",{className:"videoContainer_NvH5",children:(0,r.jsx)(o,{thumbnail:i,id:s,params:"autoplay=1&autohide=1&showinfo=0&rel=0",title:n,poster:"hqdefault",webp:!0})})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.