[v4]: add `/elementInfo` route stub

Merged
SE
8mo ago
+582-0

why

  • to add a single /elementInfo route which encapsulates multiple locator functions

what changed

  • added an /elementInfo route, which accepts a Selector, and returns the following info:
    • count
    • isVisible
    • isChecked
    • inputValue
    • textContent
    • innerHTML
    • innerText
    • centroid

screenshot:

Screenshot 2026-03-23 at 5 10 55 PM

test plan

  • added a test which verifies that the /elementInfo route accepts a request

Summary by cubic

Adds the v4 page.elementInfo endpoint (POST /v4/page/elementInfo) to fetch common element details in one call. The handler is a stub that returns defaulted fields to unblock client work.

  • New Features
    • Implemented page.elementInfo route that accepts a Selector and optional fields filter; returns: count, selector, tagName, backendNodeId, visibility, domRects, content, and optional inputInfo, ariaInfo, attributes, styles.
    • Wired the route into v4 page routes, added request/action/result/response schemas to OpenAPI, and added an integration test posting an XPath selector to assert a successful action.