MCPcopy Create free account
hub / github.com/microsoft/playwright-python / texts

Function texts

tests/sync/test_locators.py:1077–1078  ·  view source on GitHub ↗
(locator: Locator)

Source from the content-addressed store, hash-verified

1075 )
1076
1077 def texts(locator: Locator) -> list:
1078 return locator.evaluate_all("els => els.map(e => e.textContent)")
1079
1080 assert texts(page.get_by_role("alert", description="doc-2025")) == ["Alert 1"]
1081 assert texts(page.get_by_role("alert", description="report-2026")) == ["Alert 2"]

Callers 1

Calls 1

evaluate_allMethod · 0.45

Tested by

no test coverage detected