mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
feat(spec): extend AccessibilityElement and AccessibilityTree types
- AccessibilityElement gains attrs, find(), findAll() - find/findAll on both Tree and Element accept string | AttrSelector - AttrSelector = Record<string, string> for object-form AND matching
This commit is contained in:
1 parent
91f504fc11
commit
d8aa768837
1 file changed
+6
-2
@@ -1,4 +1,5 @@
|
||||
export type Snapshots = Record<string, unknown>;
|
||||
export type AttrSelector = Record<string, string>;
|
||||
|
||||
export interface AccessibilityElement {
|
||||
id?: string;
|
||||
@@ -13,11 +14,14 @@ export interface AccessibilityElement {
|
||||
bounds?: { left: number; top: number; right: number; bottom: number };
|
||||
x?: number;
|
||||
y?: number;
|
||||
attrs?: Record<string, string>;
|
||||
find(selector: string | AttrSelector): AccessibilityElement | undefined;
|
||||
findAll(selector: string | AttrSelector): AccessibilityElement[];
|
||||
}
|
||||
|
||||
export interface AccessibilityTree {
|
||||
find(selector: string): AccessibilityElement | undefined;
|
||||
findAll(selector: string): AccessibilityElement[];
|
||||
find(selector: string | AttrSelector): AccessibilityElement | undefined;
|
||||
findAll(selector: string | AttrSelector): AccessibilityElement[];
|
||||
}
|
||||
|
||||
export interface LogEntry {
|
||||
|
||||
Reference in new issue
Block a user