Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
README.md | 2025-03-17 | 2.4 kB | |
v1.51.0 source code.tar.gz | 2025-03-17 | 2.2 MB | |
v1.51.0 source code.zip | 2025-03-17 | 2.6 MB | |
Totals: 3 Items | 4.8 MB | 0 |
Highlights
- New option
setIndexedDB
for browserContext.storageState() allows to save and restore IndexedDB contents. Useful when your application uses IndexedDB API to store authentication tokens, like Firebase Authentication.
Here is an example following the authentication guide:
```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
setVisible
for 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 page.emulateMedia() and browser.newContext() allows to emulate theprefers-contrast
media feature. - New option
setFailOnStatusCode
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