diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index dcf1a11fb..bf3c6e569 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -37,7 +37,7 @@ Names are C# versions of the JavaScript API: `agent.act` is `ActAsync`, `screen. - `Assert.Ignore`, `[Retry]`, `[Timeout]`, and `[Category]` - Screen queries: role, text, label, test id, placeholder, display value, `filter` (`hasText`, `hasNotText`, `has`, and `hasNot`), `or`, `first`, `last`, `nth`. A locator offers every query kind, scoped to its matches' descendants. Every query takes a `TextMatch`: a string or a .NET `Regex`, tested against the whitespace-normalized text. A string matches the whole text, case-sensitively, unless `exact` is false, which makes it a case-insensitive substring, as upstream. `RoleOptions` carries `name`, `checked`, `disabled`, `selected`, `expanded`, `pressed`, and `level`, and `img` is read as `image`. A role query never matches a hidden node; the other kinds keep hidden nodes unless `Visible` is set, as upstream. `ScrollIntoViewAsync` acts on a hidden or disabled match, as upstream's `performUntil` reads no state (the web engine's Playwright call needs no visibility); every other action still waits for an enabled match. A text query leaves out a match with no box (a `Rect` with a zero side; a node that reports no `Rect` counts as boxed) when a match with a box exists, because upstream's web tree lists no box-less node and this tree does (a zero-sized input inside a label does not stand in for the label). A label's text is listed when its control has no box. `getByLabel` matches any node whose accessible name matches, as the upstream reference resolver does. On the web, upstream resolves text, label, and `hasText` through Playwright on the real DOM, and the port reads the same things off its tree: `getByText` and `hasText` match the element's DOM text (every descendant's text in place, no separator between two blocks, a button input's value, script and style text left out), so a placeholder, a title, an `aria-label`, or the control a label names is no text, and the label itself answers; `getByLabel` matches the node's `aria-label`, the elements its `aria-labelledby` names, and its `