MCPcopy Index your code
hub / github.com/microsoft/playwright-python / test_local_storage_items

Function test_local_storage_items

tests/sync/test_page_web_storage.py:35–42  ·  view source on GitHub ↗
(page: Page, server: Server)

Source from the content-addressed store, hash-verified

33
34
35def test_local_storage_items(page: Page, server: Server) -> None:
36 page.goto(server.EMPTY_PAGE)
37 page.local_storage.set_item("a", "1")
38 page.local_storage.set_item("b", "2")
39 items = page.local_storage.items()
40 assert len(items) == 2
41 assert {"name": "a", "value": "1"} in items
42 assert {"name": "b", "value": "2"} in items
43
44
45def test_local_storage_remove_item(page: Page, server: Server) -> None:

Callers

nothing calls this directly

Calls 3

gotoMethod · 0.45
set_itemMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected