feat: capture state and element evidence

This commit is contained in:
赵义仑
2026-06-16 19:15:52 +08:00
parent 1324f1882c
commit 581724ea42
6 changed files with 431 additions and 4 deletions

View File

@@ -6,15 +6,27 @@ import type { RawActionableElement } from "../src/types.js";
function raw(overrides: Partial<RawActionableElement>): RawActionableElement {
return {
uid: "button_0_Open settings",
candidateIndex: 0,
tag: "button",
role: "button",
accessibleName: "Open settings",
identityText: "Open settings",
text: "Open settings",
label: null,
placeholder: null,
attributes: { "data-testid": "open-settings", id: "openSettings" },
bbox: { x: 0, y: 0, width: 100, height: 30 },
visibility: { visible: true, enabled: true, editable: false, receivesEvents: true },
context: {
dialog: null,
form: null,
section: null,
row: null,
landmark: null,
listitem: null,
},
parameterSurface: null,
evidence: [],
...overrides,
};
}