tag:github.com,2008:https://github.com/microsoft/playwright-python/releases Release notes from playwright-python 2026-01-30T13:39:39Z tag:github.com,2008:Repository/276414382/v1.58.0 2026-01-30T14:35:38Z v1.58.0 <h2>Trace Viewer Improvements</h2> <ul> <li>New 'system' theme option follows your OS dark/light mode preference</li> <li>Search functionality (Cmd/Ctrl+F) is now available in code editors</li> <li>Network details panel has been reorganized for better usability</li> <li>JSON responses are now automatically formatted for readability</li> </ul> <p>Thanks to <a href="https://github.com/cpAdm">@cpAdm</a> for contributing these improvements!</p> <h2>Miscellaneous</h2> <p><a href="https://playwright.dev/python/docs/api/class-browsertype#browser-type-connect-over-cdp" rel="nofollow">browser_type.connect_over_cdp()</a> now accepts an <code>is_local</code> option. When set to <code>True</code>, it tells Playwright that it runs on the same host as the CDP server, enabling file system optimizations.</p> <h2>Breaking Changes <g-emoji class="g-emoji" alias="warning">⚠️</g-emoji></h2> <ul> <li>Removed <code>_react</code> and <code>_vue</code> selectors. See <a href="https://playwright.dev/python/docs/locators" rel="nofollow">locators guide</a> for alternatives.</li> <li>Removed <code>:light</code> selector engine suffix. Use standard CSS selectors instead.</li> <li>Option <code>devtools</code> from <a href="https://playwright.dev/python/docs/api/class-browsertype#browser-type-launch" rel="nofollow">browser_type.launch()</a> has been removed. Use <code>args=['--auto-open-devtools-for-tabs']</code> instead.</li> <li>Removed macOS 13 support for WebKit. We recommend to upgrade your macOS version, or keep using an older Playwright version.</li> </ul> <h2>Browser Versions</h2> <ul> <li>Chromium 145.0.7632.6</li> <li>Mozilla Firefox 146.0.1</li> <li>WebKit 26.0</li> </ul> <p>This version was also tested against the following stable channels:</p> <ul> <li>Google Chrome 144</li> <li>Microsoft Edge 144</li> </ul> Skn0tt tag:github.com,2008:Repository/276414382/v1.57.0 2025-12-09T07:41:29Z v1.57.0 <h2>Chrome for Testing</h2> <p>Starting with this release, Playwright switches from Chromium, to using <a href="https://developer.chrome.com/blog/chrome-for-testing/" rel="nofollow">Chrome for Testing</a> builds. Both headed and headless browsers are subject to this. Your tests should still be passing after upgrading to Playwright 1.57.</p> <p>We're expecting no functional changes to come from this switch. The biggest change is the new icon and title in your toolbar.</p> <a target="_blank" rel="noopener noreferrer" href="https://private-user-images.githubusercontent.com/14912729/518586000-e9a5c4f2-9f35-4c27-9382-0f5eda377097.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzM4Mjc1NzQsIm5iZiI6MTc3MzgyNzI3NCwicGF0aCI6Ii8xNDkxMjcyOS81MTg1ODYwMDAtZTlhNWM0ZjItOWYzNS00YzI3LTkzODItMGY1ZWRhMzc3MDk3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzE4VDA5NDc1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFlOGYzNDI3Y2VjNmYyOTBlZmJiMDc5MmIwNjczNzY5N2QxNjdmMzkyMDA2NzExZDdkZTljM2U4YmZhYjU2NTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.2DdaTaLhJ73AhpZr_akBvkGRUUW5tlMZQgqgvzpeDPg"><img width="500" alt="new and old logo" src="https://private-user-images.githubusercontent.com/14912729/518586000-e9a5c4f2-9f35-4c27-9382-0f5eda377097.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzM4Mjc1NzQsIm5iZiI6MTc3MzgyNzI3NCwicGF0aCI6Ii8xNDkxMjcyOS81MTg1ODYwMDAtZTlhNWM0ZjItOWYzNS00YzI3LTkzODItMGY1ZWRhMzc3MDk3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzE4VDA5NDc1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFlOGYzNDI3Y2VjNmYyOTBlZmJiMDc5MmIwNjczNzY5N2QxNjdmMzkyMDA2NzExZDdkZTljM2U4YmZhYjU2NTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.2DdaTaLhJ73AhpZr_akBvkGRUUW5tlMZQgqgvzpeDPg" content-type-secured-asset="image/png" style="max-width: 100%;"></a> <p>If you still see an unexpected behaviour change, please <a href="https://github.com/microsoft/playwright/issues/new">file an issue</a>.</p> <p>On Arm64 Linux, Playwright continues to use Chromium.</p> <h2>Breaking Change</h2> <p>After 3 years of being deprecated, we removed <code>page.accessibility</code> from our API. Please use other libraries such as <a href="https://www.deque.com/axe/" rel="nofollow">Axe</a> if you need to test page accessibility. See our Node.js <a href="https://playwright.dev/docs/accessibility-testing" rel="nofollow">guide</a> for integration with Axe.</p> <h2>New APIs</h2> <ul> <li><a href="https://playwright.dev/python/docs/api/class-worker#worker-event-console" rel="nofollow">worker.on("console")</a> event is emitted when JavaScript within the worker calls one of console API methods, e.g. console.log or console.dir. <a href="https://playwright.dev/python/docs/api/class-worker#worker-wait-for-event" rel="nofollow">worker.expect_event()</a> can be used to wait for it.</li> <li><a href="https://playwright.dev/python/docs/api/class-locator#locator-description" rel="nofollow">locator.description()</a> returns locator description previously set with <a href="https://playwright.dev/python/docs/api/class-locator#locator-describe" rel="nofollow">locator.describe()</a>.</li> <li>New option <a href="https://playwright.dev/python/docs/api/class-locator#locator-click-option-steps" rel="nofollow"><code>steps</code></a> in <a href="https://playwright.dev/python/docs/api/class-locator#locator-click" rel="nofollow">locator.click()</a> and <a href="https://playwright.dev/python/docs/api/class-locator#locator-drag-to" rel="nofollow">locator.drag_to()</a> that configures the number of <code>mousemove</code> events emitted while moving the mouse pointer to the target element.</li> <li>Network requests issued by <a href="https://playwright.dev/python/docs/service-workers#network-events-and-routing" rel="nofollow">Service Workers</a> are now reported and can be routed through the <a href="https://playwright.dev/python/docs/api/class-browsercontext" rel="nofollow">BrowserContext</a>, only in Chromium. You can opt out using the <code>PLAYWRIGHT_DISABLE_SERVICE_WORKER_NETWORK</code> environment variable.</li> <li>Console messages from Service Workers are dispatched through <a href="https://playwright.dev/python/docs/api/class-worker#worker-event-console" rel="nofollow">worker.on("console")</a>. You can opt out of this using the <code>PLAYWRIGHT_DISABLE_SERVICE_WORKER_CONSOLE</code> environment variable.</li> </ul> <h2>Browser Versions</h2> <ul> <li>Chromium 143.0.7499.4</li> <li>Mozilla Firefox 144.0.2</li> <li>WebKit 26.0</li> </ul> Skn0tt tag:github.com,2008:Repository/276414382/v1.56.0 2025-11-11T18:13:39Z v1.56.0 <h2>New APIs</h2> <ul> <li>New methods <a href="https://playwright.dev/python/docs/api/class-page#page-console-messages" rel="nofollow">page. console_messages()</a> and <a href="https://playwright.dev/python/docs/api/class-page#page-page-errors" rel="nofollow">page.page_errors()</a> for retrieving the most recent console messages from the page</li> <li>New method <a href="https://playwright.dev/python/docs/api/class-page#page-requests" rel="nofollow">page.requests()</a> for retrieving the most recent network requests from the page</li> </ul> <h2>Breaking Changes</h2> <ul> <li>Event <a href="https://playwright.dev/python/docs/api/class-browsercontext#browser-context-event-background-page" rel="nofollow">browserContext.on("backgroundpage")</a> has been deprecated and will not be emitted. Method <a href="https://playwright.dev/python/docs/api/class-browsercontext#browser-context-background-pages" rel="nofollow">browserContext. background_pages()</a> will return an empty list</li> </ul> <h2>Miscellaneous</h2> <ul> <li>Aria snapshots render and compare <code>input</code> <code>placeholder</code></li> </ul> <h2>Browser Versions</h2> <ul> <li>Chromium 141.0.7390.37</li> <li>Mozilla Firefox 142.0.1</li> <li>WebKit 26.0</li> </ul> yury-s tag:github.com,2008:Repository/276414382/v1.55.0 2025-08-28T10:43:43Z v1.55.0 <h2>Codegen</h2> <ul> <li>Automatic <code>to_be_visible()</code> assertions: Codegen can now generate automatic <code>to_be_visible()</code> assertions for common UI interactions. This feature can be enabled in the Codegen settings UI.</li> </ul> <h2>Breaking Changes</h2> <ul> <li><g-emoji class="g-emoji" alias="warning">⚠️</g-emoji> Dropped support for Chromium extension manifest v2.</li> </ul> <h2>Miscellaneous</h2> <ul> <li>Added support for Debian 13 "Trixie".</li> </ul> <h2>Browser Versions</h2> <ul> <li>Chromium 140.0.7339.16</li> <li>Mozilla Firefox 141.0</li> <li>WebKit 26.0</li> </ul> <p>This version was also tested against the following stable channels:</p> <ul> <li>Google Chrome 139</li> <li>Microsoft Edge 139</li> </ul> mxschmitt tag:github.com,2008:Repository/276414382/v1.54.0 2025-07-22T13:43:23Z v1.54.0 <h2>Highlights</h2> <ul> <li> <p>New cookie property <code>partition_key</code> in <a href="https://playwright.dev/python/docs/api/class-browsercontext#browser-context-cookies" rel="nofollow">BrowserContext.cookies()</a> and <a href="https://playwright.dev/python/docs/api/class-browsercontext#browser-context-add-cookies" rel="nofollow">browserContext.add_cookies()</a>. This property allows to save and restore partitioned cookies. See <a href="https://developer.mozilla.org/en-US/docs/Web/Privacy/Guides/Privacy_sandbox/Partitioned_cookies" rel="nofollow">CHIPS MDN article</a> for more information. Note that browsers have different support and defaults for cookie partitioning.</p> </li> <li> <p>New option <code>--user-data-dir</code> in multiple commands. You can specify the same user data dir to reuse browsing state, like authentication, between sessions.</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="playwright codegen --user-data-dir=./user-data"><pre>playwright codegen --user-data-dir=./user-data</pre></div> </li> <li> <p><code>playwright open</code> does not open the test recorder anymore. Use <code>playwright codegen</code> instead.</p> </li> </ul> <h2>Browser Versions</h2> <ul> <li>Chromium 139.0.7258.5</li> <li>Mozilla Firefox 140.0.2</li> <li>WebKit 26.0</li> </ul> <p>This version was also tested against the following stable channels:</p> <ul> <li>Google Chrome 140</li> <li>Microsoft Edge 140</li> </ul> mxschmitt tag:github.com,2008:Repository/276414382/v1.53.0 2025-06-25T16:23:14Z v1.53.0 <h2>Miscellaneous</h2> <ul> <li> <p>New Steps in Trace Viewer:<br> <a target="_blank" rel="noopener noreferrer" href="https://private-user-images.githubusercontent.com/17984549/451416137-1963ff7d-4070-41be-a79b-4333176921a2.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzM4Mjc1NzQsIm5iZiI6MTc3MzgyNzI3NCwicGF0aCI6Ii8xNzk4NDU0OS80NTE0MTYxMzctMTk2M2ZmN2QtNDA3MC00MWJlLWE3OWItNDMzMzE3NjkyMWEyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzE4VDA5NDc1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRhMGUwOWY3MmQwM2JhOWE4NTAyZDY3MTIxYWJkZjY1Nzc2YjE3NDdmZDczZWNlYzJiZTljYzFiMTdlNjdiMWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.EdFrenoemR5Rd1c4x84ofQgTHLQU9EEhuh0BXYL_8K8"><img src="https://private-user-images.githubusercontent.com/17984549/451416137-1963ff7d-4070-41be-a79b-4333176921a2.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzM4Mjc1NzQsIm5iZiI6MTc3MzgyNzI3NCwicGF0aCI6Ii8xNzk4NDU0OS80NTE0MTYxMzctMTk2M2ZmN2QtNDA3MC00MWJlLWE3OWItNDMzMzE3NjkyMWEyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAzMTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMzE4VDA5NDc1NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRhMGUwOWY3MmQwM2JhOWE4NTAyZDY3MTIxYWJkZjY1Nzc2YjE3NDdmZDczZWNlYzJiZTljYzFiMTdlNjdiMWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.EdFrenoemR5Rd1c4x84ofQgTHLQU9EEhuh0BXYL_8K8" alt="New Trace Viewer Steps" content-type-secured-asset="image/png" style="max-width: 100%;"></a></p> </li> <li> <p>New method <a href="https://playwright.dev/python/docs/api/class-locator#locator-describe" rel="nofollow">locator.describe()</a> to describe a locator. Used for trace viewer.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="button = page.get_by_test_id(&quot;btn-sub&quot;).describe(&quot;Subscribe button&quot;) button.click()"><pre><span class="pl-s1">button</span> <span class="pl-c1">=</span> <span class="pl-s1">page</span>.<span class="pl-c1">get_by_test_id</span>(<span class="pl-s">"btn-sub"</span>).<span class="pl-c1">describe</span>(<span class="pl-s">"Subscribe button"</span>) <span class="pl-s1">button</span>.<span class="pl-c1">click</span>()</pre></div> </li> <li> <p><code>python -m playwright install --list</code> will now list all installed browsers, versions and locations.</p> </li> </ul> <h2>Browser Versions</h2> <ul> <li>Chromium 138.0.7204.4</li> <li>Mozilla Firefox 139.0</li> <li>WebKit 18.5</li> </ul> <p>This version was also tested against the following stable channels:</p> <ul> <li>Google Chrome 137</li> <li>Microsoft Edge 137</li> </ul> agg23 tag:github.com,2008:Repository/276414382/v1.52.0 2025-04-30T09:04:16Z v1.52.0 <h2>Highlights</h2> <ul> <li> <p>New method <a href="https://playwright.dev/python/docs/api/class-locatorassertions#locator-assertions-to-contain-class" rel="nofollow">expect(locator).to_contain_class()</a> to ergonomically assert individual class names on the element.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" expect(page.get_by_role(&quot;listitem&quot;, name=&quot;Ship v1.52&quot;)).to_contain_class(&quot;done&quot;)"><pre> <span class="pl-en">expect</span>(<span class="pl-s1">page</span>.<span class="pl-c1">get_by_role</span>(<span class="pl-s">"listitem"</span>, <span class="pl-s1">name</span><span class="pl-c1">=</span><span class="pl-s">"Ship v1.52"</span>)).<span class="pl-c1">to_contain_class</span>(<span class="pl-s">"done"</span>)</pre></div> </li> <li> <p><a href="https://playwright.dev/python/docs/aria-snapshots" rel="nofollow">Aria Snapshots</a> got two new properties: <a href="https://playwright.dev/python/docs/aria-snapshots#strict-matching" rel="nofollow"><code>/children</code></a> for strict matching and <code>/url</code> for links.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="expect(locator).to_match_aria_snapshot(&quot;&quot;&quot; - list - /children: equal - listitem: Feature A - listitem: - link &quot;Feature B&quot;: - /url: &quot;https://playwright.dev&quot; &quot;&quot;&quot;)"><pre><span class="pl-en">expect</span>(<span class="pl-s1">locator</span>).<span class="pl-c1">to_match_aria_snapshot</span>(<span class="pl-s">"""</span> <span class="pl-s"> - list</span> <span class="pl-s"> - /children: equal</span> <span class="pl-s"> - listitem: Feature A</span> <span class="pl-s"> - listitem:</span> <span class="pl-s"> - link "Feature B":</span> <span class="pl-s"> - /url: "https://playwright.dev"</span> <span class="pl-s">"""</span>)</pre></div> </li> </ul> <h2>Miscellaneous</h2> <ul> <li>New option <a href="https://playwright.dev/python/docs/api/class-apirequest#api-request-new-context-option-max-redirects" rel="nofollow"><code>max_redirects</code></a> in <a href="https://playwright.dev/python/docs/api/class-apirequest#api-request-new-context" rel="nofollow">apiRequest.new_context()</a> to control the maximum number of redirects.</li> <li>New option <a href="https://playwright.dev/python/docs/api/class-locator#locator-aria-snapshot-option-ref" rel="nofollow"><code>ref</code></a> in <a href="https://playwright.dev/python/docs/api/class-locator#locator-aria-snapshot" rel="nofollow">locator.aria_snapshot()</a> to generate reference for each element in the snapshot which can later be used to locate the element.</li> </ul> <h2>Breaking Changes</h2> <ul> <li>Method <a href="https://playwright.dev/python/docs/api/class-route#route-continue" rel="nofollow">route.continue()</a> does not allow to override the <code>Cookie</code> header anymore. If a <code>Cookie</code> header is provided, it will be ignored, and the cookie will be loaded from the browser's cookie store. To set custom cookies, use <a href="https://playwright.dev/python/docs/api/class-browsercontext#browser-context-add-cookies" rel="nofollow">browserContext.add_cookies()</a>.</li> <li>macOS 13 is now deprecated and will no longer receive WebKit updates. Please upgrade to a more recent macOS version to continue benefiting from the latest WebKit improvements.</li> </ul> <h2>Browser Versions</h2> <ul> <li>Chromium 136.0.7103.25</li> <li>Mozilla Firefox 137.0</li> <li>WebKit 18.4</li> </ul> <p>This version was also tested against the following stable channels:</p> <ul> <li>Google Chrome 135</li> <li>Microsoft Edge 135</li> </ul> mxschmitt tag:github.com,2008:Repository/276414382/v1.51.0 2025-03-18T09:08:47Z v1.51.0 <h2>Highlights</h2> <ul> <li> <p>New option <a href="https://playwright.dev/python/docs/api/class-browsercontext#browser-context-storage-state-option-indexed-db" rel="nofollow"><code>indexed_db</code></a> for <a href="https://playwright.dev/python/docs/api/class-browsercontext#browser-context-storage-state" rel="nofollow">browserContext.storage_state()</a> allows to save and restore IndexedDB contents. Useful when your application uses <a href="https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API" rel="nofollow">IndexedDB API</a> to store authentication tokens, like Firebase Authentication.</p> <p>Here is an example following the <a href="https://playwright.dev/python/docs/auth#reusing-signed-in-state" rel="nofollow">authentication guide</a>:</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Save storage state into the file. Make sure to include IndexedDB. storage = context.storage_state(path=&quot;state.json&quot;, indexed_db=True) # Create a new context with the saved storage state. context = browser.new_context(storage_state=&quot;state.json&quot;)"><pre><span class="pl-c"># Save storage state into the file. Make sure to include IndexedDB.</span> <span class="pl-s1">storage</span> <span class="pl-c1">=</span> <span class="pl-s1">context</span>.<span class="pl-c1">storage_state</span>(<span class="pl-s1">path</span><span class="pl-c1">=</span><span class="pl-s">"state.json"</span>, <span class="pl-s1">indexed_db</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-c"># Create a new context with the saved storage state.</span> <span class="pl-s1">context</span> <span class="pl-c1">=</span> <span class="pl-s1">browser</span>.<span class="pl-c1">new_context</span>(<span class="pl-s1">storage_state</span><span class="pl-c1">=</span><span class="pl-s">"state.json"</span>)</pre></div> </li> <li> <p>New option <a href="https://playwright.dev/python/docs/api/class-locator#locator-filter-option-visible" rel="nofollow"><code>visible</code></a> for <a href="https://playwright.dev/python/docs/api/class-locator#locator-filter" rel="nofollow">locator.filter()</a> allows matching only visible elements.</p> <div class="highlight highlight-source-python notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# Ignore invisible todo items. todo_items = page.get_by_test_id(&quot;todo-item&quot;).filter(visible=True) # Check there are exactly 3 visible ones. expect(todo_items).to_have_count(3)"><pre><span class="pl-c"># Ignore invisible todo items.</span> <span class="pl-s1">todo_items</span> <span class="pl-c1">=</span> <span class="pl-s1">page</span>.<span class="pl-c1">get_by_test_id</span>(<span class="pl-s">"todo-item"</span>).<span class="pl-c1">filter</span>(<span class="pl-s1">visible</span><span class="pl-c1">=</span><span class="pl-c1">True</span>) <span class="pl-c"># Check there are exactly 3 visible ones.</span> <span class="pl-en">expect</span>(<span class="pl-s1">todo_items</span>).<span class="pl-c1">to_have_count</span>(<span class="pl-c1">3</span>)</pre></div> </li> <li> <p>New option <code>contrast</code> for methods <a href="https://playwright.dev/python/docs/api/class-page#page-emulate-media" rel="nofollow">page.emulate_media()</a> and <a href="https://playwright.dev/python/docs/api/class-browser#browser-new-context" rel="nofollow">browser.new_context()</a> allows to emulate the <code>prefers-contrast</code> media feature.</p> </li> <li> <p>New option <a href="https://playwright.dev/python/docs/api/class-apirequest#api-request-new-context-option-fail-on-status-code" rel="nofollow"><code>fail_on_status_code</code></a> makes all fetch requests made through the <a href="https://playwright.dev/python/docs/api/class-apirequestcontext" rel="nofollow">APIRequestContext</a> throw on response codes other than 2xx and 3xx.</p> </li> </ul> <h2>Browser Versions</h2> <ul> <li>Chromium 134.0.6998.35</li> <li>Mozilla Firefox 135.0</li> <li>WebKit 18.4</li> </ul> <p>This version was also tested against the following stable channels:</p> <ul> <li>Google Chrome 133</li> <li>Microsoft Edge 133</li> </ul> mxschmitt tag:github.com,2008:Repository/276414382/v1.50.0 2025-02-03T14:36:14Z v1.50.0 <h2>Async Pytest Plugin</h2> <ul> <li><a href="https://playwright.dev/python/docs/test-runners" rel="nofollow">Playwright's Pytest plugin</a> now has support for <a href="https://playwright.dev/python/docs/test-runners#async-fixtures" rel="nofollow">Async Fixtures</a>.</li> </ul> <h2>Miscellaneous</h2> <ul> <li>Added method <a href="https://playwright.dev/python/docs/api/class-locatorassertions#locator-assertions-to-have-accessible-error-message" rel="nofollow">expect(locator).to_have_accessible_error_message()</a> to assert the Locator points to an element with a given <a href="https://w3c.github.io/aria/#aria-errormessage" rel="nofollow">aria errormessage</a>.</li> </ul> <h2>UI updates</h2> <ul> <li>New button in Codegen for picking elements to produce aria snapshots.</li> <li>Additional details (such as keys pressed) are now displayed alongside action API calls in traces.</li> <li>Display of <code>canvas</code> content in traces is error-prone. Display is now disabled by default, and can be enabled via the <code>Display canvas content</code> UI setting.</li> <li><code>Call</code> and <code>Network</code> panels now display additional time information.</li> </ul> <h2>Breaking</h2> <ul> <li><a href="https://playwright.dev/python/docs/api/class-locatorassertions#locator-assertions-to-be-editable" rel="nofollow">expect(locator).to_be_editable()</a> and <a href="https://playwright.dev/python/docs/api/class-locator#locator-is-editable" rel="nofollow">locator.is_editable()</a> now throw if the target element is not <code>&lt;input&gt;</code>, <code>&lt;select&gt;</code>, or a number of other editable elements.</li> </ul> <h2>Browser Versions</h2> <ul> <li>Chromium 133.0.6943.16</li> <li>Mozilla Firefox 134.0</li> <li>WebKit 18.2</li> </ul> <p>This version was also tested against the following stable channels:</p> <ul> <li>Google Chrome 132</li> <li>Microsoft Edge 132</li> </ul> mxschmitt tag:github.com,2008:Repository/276414382/v1.49.1 2024-12-10T17:24:05Z v1.49.1 <h3>Highlights</h3> <p><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="2713355008" data-permission-text="Title is private" data-url="https://github.com/microsoft/playwright-python/issues/2679" data-hovercard-type="issue" data-hovercard-url="/microsoft/playwright-python/issues/2679/hovercard" href="https://github.com/microsoft/playwright-python/issues/2679">#2679</a> - [Bug]: Warning: Validation of the RECORD file of playwright-1.49.0-py3-none-manylinux1_x86_64.whl failed</p> <h2>Browser Versions</h2> <ul> <li>Chromium 131.0.6778.33</li> <li>Mozilla Firefox 132.0</li> <li>WebKit 18.2</li> </ul> <p>This version was also tested against the following stable channels:</p> <ul> <li>Google Chrome 130</li> <li>Microsoft Edge 130</li> </ul> mxschmitt