new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Playwright · API reference · all subjects

webstorage

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

WebStorage usage example C#

C# example: await page.GotoAsync("https://example.com"); await page.LocalStorage.SetItemAsync("token", "abc"); var token = await page.LocalStorage.GetItemAsync("token"); var all = await page.LocalStorage.ItemsAsync(); await page.LocalStorage.RemoveItemAsync("token"); await page.LocalStorage.ClearAsync();

WebStorage class provides async localStorage and sessionStorage API

WebStorage exposes the page's localStorage or sessionStorage for the current origin via an async, browser-consistent API. Instances are accessed through Page.localStorage and Page.sessionStorage properties. The class was introduced in v1.61.

WebStorage usage example JavaScript

JavaScript example: await page.goto('https://example.com'); await page.localStorage.setItem('token', 'abc'); const token = await page.localStorage.getItem('token'); const all = await page.localStorage.items(); await page.localStorage.removeItem('token'); await page.localStorage.clear();

WebStorage usage example Python sync

Python sync example: page.goto("https://example.com"); page.local_storage.set_item("token", "abc"); token = page.local_storage.get_item("token"); all = page.local_storage.items(); page.local_storage.remove_item("token"); page.local_storage.clear();

WebStorage usage example Java

Java example: page.navigate("https://example.com"); page.localStorage().setItem("token", "abc"); String token = page.localStorage().getItem("token"); List<WebStorageItem> all = page.localStorage().items(); page.localStorage().removeItem("token"); page.localStorage().clear();

Give your agent this brain