Skip to main content

Module web_storage

Module web_storage 

Source
Expand description

WebStorage: per-origin localStorage / sessionStorage access.

Obtained via Page::local_storage / Page::session_storage. Reads and writes the current origin’s storage directly through the Page channel (not via page.evaluate), matching playwright-python’s WebStorage.

page.goto("https://example.com", None).await?;
let storage = page.local_storage();
storage.set_item("token", "abc123").await?;
assert_eq!(storage.get_item("token").await?, Some("abc123".to_string()));

See: https://playwright.dev/docs/api/class-webstorage

Structs§

WebStorage
Read/write access to a page’s localStorage or sessionStorage for the current origin.

Enums§

WebStorageKind
Which storage area a WebStorage handle targets.