---
title: "Heal a broken selector"
method: POST
path: "/v1/browser/heal"
tags: ["Browser"]
---

# Heal a broken selector

`POST /v1/browser/heal`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/browser/heal`
- Auth: HTTP bearer

## Request body

- object
  - `selector` string, required: Piper selector to repair, for example `role:button:Submit`

## Response `200`

Healed selector suggestion

- object
  - `healed` boolean, required
  - `selector` string, nullable: Healed selector when a candidate was found
  - `confidence` string, nullable: Confidence label for the healed selector (`high` or `medium`)
  - `original` string, required: Original selector that failed
  - `candidateName` string, nullable: Accessible name of the chosen candidate when healing succeeds
  - `candidateRole` string, nullable: Accessibility role of the chosen candidate when healing succeeds
  - `source` string, required: Healing source, currently `ax-fuzzy`
  - `reason` 'candidate_found' | 'element_missing' | 'ambiguous_match' | 'ancestor_missing' | 'no_candidate', nullable: Diagnostic reason for the result
  - `details` string[], nullable: Human-readable diagnostics describing attempted healing strategies

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
