Skip to content

Add composable / filtered candidate locators (chained locator)#353

Merged
JE-Chen merged 1 commit into
devfrom
feat/locator-chain-batch
Jun 23, 2026
Merged

Add composable / filtered candidate locators (chained locator)#353
JE-Chen merged 1 commit into
devfrom
feat/locator-chain-batch

Conversation

@JE-Chen

@JE-Chen JE-Chen commented Jun 23, 2026

Copy link
Copy Markdown
Member

anchor_locator is a single anchor→target relation and grid_locator addresses cells — neither supports composable refinement of a candidate set (.within(panel).filter(has_text='Delete').nth(2)), the Selenium-4 / Playwright chained-and-filtered locator idiom.

  • from_boxes(boxes)Candidates: a pure post-filter over boxes from any source (template / OCR / a11y / fuse_elements). Methods within (region clip), filter (has_text / near / min_area / max_area / predicate), sort_reading, nth / first / last, resolve(), center(). Every method returns a NEW Candidates (no mutation).
  • AC_locate_chain applies a JSON ops list to a boxes array → {count, boxes, center}.
  • Pure-stdlib; reuses element_parse.reading_order for sort_reading (no dup). Fully headless-testable. Wired through all 5 layers + headless test + EN/Zh docs + WHATS_NEW. Qt-free.

@JE-Chen JE-Chen merged commit a3ed5f8 into dev Jun 23, 2026
15 of 16 checks passed
@JE-Chen JE-Chen deleted the feat/locator-chain-batch branch June 23, 2026 00:35
@sonarqubecloud

Copy link
Copy Markdown

@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant