Evidence
Pointing at the element
Most reports are about one thing on the page. pickElement() turns the cursor
into a crosshair, highlights whatever is under it, and resolves with a
description of the element the reporter clicks: a short CSS selector, the tag,
the visible text, the position on the page, and the useful attributes (id,
name, role, aria-label, href, every data-*). Escape cancels. The click
is swallowed, so picking a button does not also press it.
jsonc
{
"selector": "form#checkout > button:nth-of-type(2)",
"tag": "button",
"text": "Save order",
"rect": { "x": 912, "y": 640, "width": 118, "height": 36 },
"attributes": { "type": "submit", "data-testid": "save-order" }
}The selector prefers an id or a data-testid on the element or an ancestor,
then falls back to tag:nth-of-type steps, at most five deep. It is meant to
be read by a person or an agent, and to land on the right file — not to be a
stable locator for a test suite.