Optimize Selector
browser_optimize_selectorGet a compact unique selector for a known target element on an active page with raw capture acknowledged. Verify the result with browser_get_elements before automating.
Instructions
Use when a full-profile workflow needs a shorter unique selector for a target that is already known. Preconditions: an active page, acknowledgeRawCapture: true, and a selector matching the intended element are required. Next: verify the returned selector with browser_get_elements before relying on it in automation. Sensitivity: candidate analysis reads DOM attributes and text that may be sensitive.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| role | No | ||
| selector | Yes | ||
| targetIndex | No | ||
| textContains | No | ||
| candidateLimit | No | ||
| includeRejected | No | ||
| acknowledgeRawCapture | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | No | ||
| result | No |