Browser

Read one element's DOM facts

The browser_element_get tool's mirror. Names the element one way (backendNodeId, uid, selector, or x and y) and answers its tag, id, classes, attributes, accessible role and name, box, visibility, text excerpt, child count, parent summary and framework owner. Read-only.

post/v1/browser/element

Request

  • Base URL: http://localhost:9998
  • URL: http://localhost:9998/v1/browser/element
  • Auth: HTTP bearer

Request body

backendNodeIdinteger

A browser_snapshot node's backendDOMNodeId (preferred)

uidstring

A browser_snapshot node's id

selectorstring

A Piper selector matching one element (role:, label:, testid:, text:, css:)

xnumber

Viewport x coordinate, with y

ynumber

Viewport y coordinate, with x

htmlboolean

Include the element's outer HTML, up to 4,000 characters

Response

The element

backendNodeIdinteger required
tagNamestring required
classesstring[] required
attributesobject[] required
visibleboolean required
inViewportboolean required
childElementCountinteger required
truncatedboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.