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

Function test_local_storage_clear

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

Source from the content-addressed store, hash-verified

51
52
53def test_local_storage_clear(page: Page, server: Server) -> None:
54 page.goto(server.EMPTY_PAGE)
55 page.local_storage.set_item("foo", "bar")
56 page.local_storage.clear()
57 length = page.evaluate("() => localStorage.length")
58 assert length == 0
59
60
61def test_session_storage_set_and_get_item(page: Page, server: Server) -> None:

Callers

nothing calls this directly

Calls 4

gotoMethod · 0.45
set_itemMethod · 0.45
clearMethod · 0.45
evaluateMethod · 0.45

Tested by

no test coverage detected