Skip to content

Get Best Selector Node

Automation/Selector

Gets the highest-ranked selector from a ranked set

selector_get_bestautomation
Inputs2
Outputs4
Security exposureUnrated
Packageautomation

Ratings

Scores range from 0 to 10. Higher values mean more impact, exposure, or operational weight.

No score metadata has been set for this node yet.

Input Pins

2

▶

Execution
exec_in

Trigger

Ranked Set

Struct
ranked_set

Ranked selector set

RankedSelectorSetRankedSelectorSet2 fields
rankedArray<RankedSelector>required
itemsRankedSelectorarray item
selectorSelectorrequired
kindSelectorKindrequired
valuestringrequired
confidencenumber | null
format double
scopestring | null
rankinteger:uintrequired
format uintmin 0
scorenumber:doublerequired
format double
reasonstring | null
context_hashstring | null

Output Pins

4

Found

Execution
exec_found

Best selector found

Empty

Execution
exec_empty

No selectors in set

Selector

Struct
selector

Best selector

SelectorSelector4 fields
kindSelectorKindrequired
variant 1enumvariant
enum "Css", "Xpath", "TextExact", "TestId"...
variant 2constvariant

Visible text contained in the element; script, style and head content is ignored.

const "Text"
variant 3constvariant

ARIA role, optionally filtered by accessible name: `button`, `button|Sign in` (case-insensitive substring), `button|=Sign in` (exact) or `button|/^sign/i` (regex).

const "Role"
variant 4constvariant

Element ref from the latest Browser Snapshot, such as `e12`.

const "Ref"
valuestringrequired
confidencenumber | null
format double
scopestring | null

Score

Float
score

Selector score

Node Info

Internal name
selector_get_best
Category
Automation/Selector