Skip to content

Commit 52ddca4

Browse files
committed
cherry-pick(#35043): docs: release notes for 1.51 for java, python, csharp
1 parent 1f13108 commit 52ddca4

File tree

3 files changed

+134
-0
lines changed

3 files changed

+134
-0
lines changed

docs/src/release-notes-csharp.md

+48
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,54 @@ title: "Release notes"
44
toc_max_heading_level: 2
55
---
66

7+
## Version 1.51
8+
9+
### Highlights
10+
11+
* 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.
12+
13+
Here is an example following the [authentication guide](./auth.md#reusing-signed-in-state):
14+
15+
```csharp
16+
// Save storage state into the file. Make sure to include IndexedDB.
17+
await context.StorageStateAsync(new()
18+
{
19+
Path = "../../../playwright/.auth/state.json",
20+
IndexedDB = true
21+
});
22+
23+
// Create a new context with the saved storage state.
24+
var context = await browser.NewContextAsync(new()
25+
{
26+
StorageStatePath = "../../../playwright/.auth/state.json"
27+
});
28+
```
29+
30+
* New option [`option: Locator.filter.visible`] for [`method: Locator.filter`] allows matching only visible elements.
31+
32+
```csharp
33+
// Ignore invisible todo items.
34+
var todoItems = Page.GetByTestId("todo-item").Filter(new() { Visible = true });
35+
// Check there are exactly 3 visible ones.
36+
await Expect(todoItems).ToHaveCountAsync(3);
37+
```
38+
39+
* New option `Contrast` for methods [`method: Page.emulateMedia`] and [`method: Browser.newContext`] allows to emulate the `prefers-contrast` media feature.
40+
41+
* New option [`option: APIRequest.newContext.failOnStatusCode`] makes all fetch requests made through the [APIRequestContext] throw on response codes other than 2xx and 3xx.
42+
43+
### Browser Versions
44+
45+
* Chromium 134.0.6998.35
46+
* Mozilla Firefox 135.0
47+
* WebKit 18.4
48+
49+
This version was also tested against the following stable channels:
50+
51+
* Google Chrome 133
52+
* Microsoft Edge 133
53+
54+
755
## Version 1.50
856

957
### Support for Xunit

docs/src/release-notes-java.md

+45
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,51 @@ title: "Release notes"
44
toc_max_heading_level: 2
55
---
66

7+
## Version 1.51
8+
9+
### Highlights
10+
11+
* 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.
12+
13+
Here is an example following the [authentication guide](./auth.md#reusing-signed-in-state):
14+
15+
```java
16+
// Save storage state into the file. Make sure to include IndexedDB.
17+
context.storageState(new BrowserContext.StorageStateOptions()
18+
.setPath(Paths.get("state.json"))
19+
.setIndexedDB(true));
20+
21+
// Create a new context with the saved storage state.
22+
BrowserContext context = browser.newContext(new Browser.NewContextOptions()
23+
.setStorageStatePath(Paths.get("state.json")));
24+
```
25+
26+
* New option [`option: Locator.filter.visible`] for [`method: Locator.filter`] allows matching only visible elements.
27+
28+
```java
29+
// Ignore invisible todo items.
30+
Locator todoItems = page.getByTestId("todo-item")
31+
.filter(new Locator.FilterOptions().setVisible(true));
32+
// Check there are exactly 3 visible ones.
33+
assertThat(todoItems).hasCount(3);
34+
```
35+
36+
* New option `setContrast` for methods [`method: Page.emulateMedia`] and [`method: Browser.newContext`] allows to emulate the `prefers-contrast` media feature.
37+
38+
* New option [`option: APIRequest.newContext.failOnStatusCode`] makes all fetch requests made through the [APIRequestContext] throw on response codes other than 2xx and 3xx.
39+
40+
### Browser Versions
41+
42+
* Chromium 134.0.6998.35
43+
* Mozilla Firefox 135.0
44+
* WebKit 18.4
45+
46+
This version was also tested against the following stable channels:
47+
48+
* Google Chrome 133
49+
* Microsoft Edge 133
50+
51+
752
## Version 1.50
853

954
### Miscellaneous

docs/src/release-notes-python.md

+41
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,47 @@ title: "Release notes"
44
toc_max_heading_level: 2
55
---
66

7+
## Version 1.51
8+
9+
### Highlights
10+
11+
* 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.
12+
13+
Here is an example following the [authentication guide](./auth.md#reusing-signed-in-state):
14+
15+
```python
16+
# Save storage state into the file. Make sure to include IndexedDB.
17+
storage = await context.storage_state(path="state.json", indexed_db=True)
18+
19+
# Create a new context with the saved storage state.
20+
context = await browser.new_context(storage_state="state.json")
21+
```
22+
23+
* New option [`option: Locator.filter.visible`] for [`method: Locator.filter`] allows matching only visible elements.
24+
25+
```python
26+
# Ignore invisible todo items.
27+
todo_items = page.get_by_test_id("todo-item").filter(visible=True)
28+
# Check there are exactly 3 visible ones.
29+
await expect(todo_items).to_have_count(3)
30+
```
31+
32+
* New option `contrast` for methods [`method: Page.emulateMedia`] and [`method: Browser.newContext`] allows to emulate the `prefers-contrast` media feature.
33+
34+
* New option [`option: APIRequest.newContext.failOnStatusCode`] makes all fetch requests made through the [APIRequestContext] throw on response codes other than 2xx and 3xx.
35+
36+
### Browser Versions
37+
38+
* Chromium 134.0.6998.35
39+
* Mozilla Firefox 135.0
40+
* WebKit 18.4
41+
42+
This version was also tested against the following stable channels:
43+
44+
* Google Chrome 133
45+
* Microsoft Edge 133
46+
47+
748
## Version 1.50
849

950
### Async Pytest Plugin

0 commit comments

Comments
 (0)