Skip to content

common_browser.targeting

Playwright query resolution shared by actions and observation.

Classes

Targeting

Resolve immutable queries and fingerprint exact observed DOM nodes.

Fields and properties declared here; inherited members belong to the bases above.

FINGERPRINT_JS

FINGERPRINT_JS = "el => {\n const value = JSON.stringify([el.tagName, ...['id','name','type','href','role','data-testid','aria-label'].map(k => el.getAttribute(k)), (el.textContent || '').trim().slice(0,512)]);\n return value.length <= 65536 ? value : null;\n }"

fingerprint

@classmethod
async def fingerprint(node: Any) -> str

frame

@classmethod
async def frame(native_page: Any, target: Target) -> Any

query

@classmethod
def query(root: Any, target: Target) -> Any

resolve

@classmethod
async def resolve(native_page: Any, target: Target, root: Any = None) -> Any

strict

@staticmethod
async def strict(locator: Any) -> None

Admit one query match before an operation invokes its SDK action.