Pinar
HomePlansWhat’s newHelp
Sign in
⌘ K

Get startedCaptures and pinsAI agentsProjects and collectionsCloud and plansPrivacy and data
Get started
Captures and pins
Element, area, full-page, and iframe capturesPins, comments, and colorsCapture a full pageSmart locators and DOM selectionMask sensitive areasCopy, view, and reopen a capture
AI agents
Projects and collections
Cloud and plans
Privacy and data
Help/Captures and pins

Smart locators and DOM selection

Understand how a pin follows an element after the page changes and why Pinar may ask for manual placement.

5 min
Visual example: Smart selection outlines the element under the cursor so you can walk the DOM with the arrow keys before pinning.

In this guide

  1. 1Resilient fingerprints
  2. 2Confidence and ambiguity
  3. 3Selector fallback and competing matches
1

Resilient fingerprints

An element pin combines a stable selector, DOM path, tag, id, name, test id, role, classes, text, label, and geometry. During reopen, Pinar evaluates selector, structure, semantics, and geometry rather than trusting one fragile path.

2

Confidence and ambiguity

A match can be exact, probable, ambiguous, or unresolved. When two candidates are too similar, Pinar keeps alternatives instead of snapping the pin to the wrong element. Cross-origin iframe targets can remain unresolved.

3

Selector fallback and competing matches

At capture time Pinar prefers a selector that uniquely matches the node by id, data-testid or data-test, or tag plus name. If none of those is unique, it stores a structural CSS path instead. Class names that look generated are dropped from the fingerprint so hashed CSS modules do not become the only signal.

On reopen, candidates from stable-selector, structure, semantic, and geometry strategies are merged and ranked. Exact confidence requires a high-scoring stable selector or structure hit; semantic and geometry matches stay probable. When the top two viable scores differ by less than a narrow margin, the result is ambiguous and no element is chosen.

  • A positional :nth-of-type selector is scored lower when other nodes share the same tag, text, and classes.
  • Area pins are rejected as element targets and remain unresolved during locator scoring.
  • When an iframe contentDocument is unreadable, relocation stops with a cross-origin-frame warning instead of guessing.
Still need context?See all in category

On this page

Resilient fingerprintsConfidence and ambiguitySelector fallback and competing matches
Support Fair Source development

Prefer supporting public source development directly? Sponsor on GitHub or buy a coffee.

Buy Me a CoffeeSponsor on GitHub
Pinar·© 2026·Pinar v0.3.6
Terms of ServicePrivacy Policy