diff --git a/pkg/spec/src/types.ts b/pkg/spec/src/types.ts index 5019187..c1c1ef7 100644 --- a/pkg/spec/src/types.ts +++ b/pkg/spec/src/types.ts @@ -1,4 +1,5 @@ export type Snapshots = Record; +export type AttrSelector = Record; 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; + 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 {