Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs: release notes for 1.51 for java, python, csharp (#35043)

Dmitry Gozmana64ba9689a77
diff --git a/docs/src/release-notes-csharp.md b/docs/src/release-notes-csharp.md
index be1e2304f4..e3759f5c0e 100644
--- a/docs/src/release-notes-csharp.md
+++ b/docs/src/release-notes-csharp.md
@@ -4,6 +4,54 @@ title: "Release notes"
toc_max_heading_level: 2
---
+## Version 1.51
+
+### Highlights
+
+* New option [`option: BrowserContext.storageState.indexedDB`] for [`method: BrowserContext.storageState`] allows to save and restore IndexedDB contents. Useful when your application uses [IndexedDB API](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) to store authentication tokens, like Firebase Authentication.
+
+ Here is an example following the [authentication guide](./auth.md#reusing-signed-in-state):
+
+ ```csharp
+ // Save storage state into the file. Make sure to include IndexedDB.
+ await context.StorageStateAsync(new()
+ {
+ Path = "../../../playwright/.auth/state.json",
+ IndexedDB = true
+ });
+
+ // Create a new context with the saved storage state.
+ var context = await browser.NewContextAsync(new()
+ {
+ StorageStatePath = "../../../playwright/.auth/state.json"
+ });
+ ```
+
+* New option [`option: Locator.filter.visible`] for [`method: Locator.filter`] allows matching only visible elements.
+
+ ```csharp
+ // Ignore invisible todo items.
+ var todoItems = Page.GetByTestId("todo-item").Filter(new() { Visible = true });
+ // Check there are exactly 3 visible ones.
+ await Expect(todoItems).ToHaveCountAsync(3);
+ ```
+
+* New option `Contrast` for methods [`method: Page.emulateMedia`] and [`method: Browser.newContext`] allows to emulate the `prefers-contrast` media feature.
+
+* New option [`option: APIRequest.newContext.failOnStatusCode`] makes all fetch requests made through the [APIRequestContext] throw on response codes other than 2xx and 3xx.
+
+### Browser Versions
+
+* Chromium 134.0.6998.35
+* Mozilla Firefox 135.0
+* WebKit 18.4
+
+This version was also tested against the following stable channels:
+
+* Google Chrome 133
+* Microsoft Edge 133
+
+
## Version 1.50
### Support for Xunit
diff --git a/docs/src/release-notes-java.md b/docs/src/release-notes-java.md
index 141d534aac..6649a1d1c8 100644
--- a/docs/src/release-notes-java.md
+++ b/docs/src/release-notes-java.md
@@ -4,6 +4,51 @@ title: "Release notes"
toc_max_heading_level: 2
---
+## Version 1.51
+
+### Highlights
+
+* New option [`option: BrowserContext.storageState.indexedDB`] for [`method: BrowserContext.storageState`] allows to save and restore IndexedDB contents. Useful when your application uses [IndexedDB API](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) to store authentication tokens, like Firebase Authentication.
+
+ Here is an example following the [authentication guide](./auth.md#reusing-signed-in-state):
+
+ ```java
+ // Save storage state into the file. Make sure to include IndexedDB.
+ context.storageState(new BrowserContext.StorageStateOptions()
+ .setPath(Paths.get("state.json"))
+ .setIndexedDB(true));
+
+ // Create a new context with the saved storage state.
+ BrowserContext context = browser.newContext(new Browser.NewContextOptions()
+ .setStorageStatePath(Paths.get("state.json")));
+ ```
+
+* New option [`option: Locator.filter.visible`] for [`method: Locator.filter`] allows matching only visible elements.
+
+ ```java
+ // Ignore invisible todo items.
+ Locator todoItems = page.getByTestId("todo-item")
+ .filter(new Locator.FilterOptions().setVisible(true));
+ // Check there are exactly 3 visible ones.
+ assertThat(todoItems).hasCount(3);
+ ```
+
+* New option `setContrast` for methods [`method: Page.emulateMedia`] and [`method: Browser.newContext`] allows to emulate the `prefers-contrast` media feature.
+
+* New option [`option: APIRequest.newContext.failOnStatusCode`] makes all fetch requests made through the [APIRequestContext] throw on response codes other than 2xx and 3xx.
+
+### Browser Versions
+
+* Chromium 134.0.6998.35
+* Mozilla Firefox 135.0
+* WebKit 18.4
+
+This version was also tested against the following stable channels:
+
+* Google Chrome 133
+* Microsoft Edge 133
+
+
## Version 1.50
### Miscellaneous
diff --git a/docs/src/release-notes-python.md b/docs/src/release-notes-python.md
index 971041d5c7..c0fdc32e25 100644
--- a/docs/src/release-notes-python.md
+++ b/docs/src/release-notes-python.md
@@ -4,6 +4,47 @@ title: "Release notes"
toc_max_heading_level: 2
---
+## Version 1.51
+
+### Highlights
+
+* New option [`option: BrowserContext.storageState.indexedDB`] for [`method: BrowserContext.storageState`] allows to save and restore IndexedDB contents. Useful when your application uses [IndexedDB API](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) to store authentication tokens, like Firebase Authentication.
+
+ Here is an example following the [authentication guide](./auth.md#reusing-signed-in-state):
+
+ ```python
+ # Save storage state into the file. Make sure to include IndexedDB.
+ storage = await context.storage_state(path="state.json", indexed_db=True)
+
+ # Create a new context with the saved storage state.
+ context = await browser.new_context(storage_state="state.json")
+ ```
+
+* New option [`option: Locator.filter.visible`] for [`method: Locator.filter`] allows matching only visible elements.
+
+ ```python
+ # Ignore invisible todo items.
+ todo_items = page.get_by_test_id("todo-item").filter(visible=True)
+ # Check there are exactly 3 visible ones.
+ await expect(todo_items).to_have_count(3)
+ ```
+
+* New option `contrast` for methods [`method: Page.emulateMedia`] and [`method: Browser.newContext`] allows to emulate the `prefers-contrast` media feature.
+
+* New option [`option: APIRequest.newContext.failOnStatusCode`] makes all fetch requests made through the [APIRequestContext] throw on response codes other than 2xx and 3xx.
+
+### Browser Versions
+
+* Chromium 134.0.6998.35
+* Mozilla Firefox 135.0
+* WebKit 18.4
+
+This version was also tested against the following stable channels:
+
+* Google Chrome 133
+* Microsoft Edge 133
+
+
## Version 1.50
### Async Pytest Plugin