feat(spec): expose SelectorPath in find/findAll signatures

This commit is contained in:
pj committed 2026-04-27 00:02:34 +07:00
1 parent 0b3141fe3f
commit 049ef80206
2 files changed
+7 -4

No files matched your search

+1
View File
@@ -13,6 +13,7 @@ export type {
Point,
PressKeyAction,
Sampler,
SelectorPath,
Snapshots,
State,
SwipeAction,
+6 -4
View File
@@ -1,6 +1,8 @@
export type Snapshots = Record<string, unknown>;
export type AttrSelector = Record<string, string>;
export type SelectorPath = readonly AttrSelector[];
export interface AccessibilityElement {
id?: string;
text?: string;
@@ -15,13 +17,13 @@ export interface AccessibilityElement {
x?: number;
y?: number;
attrs?: Record<string, string>;
find(selector: string | AttrSelector): AccessibilityElement | undefined;
findAll(selector: string | AttrSelector): AccessibilityElement[];
find(selector: string | AttrSelector | SelectorPath): AccessibilityElement | undefined;
findAll(selector: string | AttrSelector | SelectorPath): AccessibilityElement[];
}
export interface AccessibilityTree {
find(selector: string | AttrSelector): AccessibilityElement | undefined;
findAll(selector: string | AttrSelector): AccessibilityElement[];
find(selector: string | AttrSelector | SelectorPath): AccessibilityElement | undefined;
findAll(selector: string | AttrSelector | SelectorPath): AccessibilityElement[];
}
export interface LogEntry {