import type { ViewNode } from '@mobilewright/protocol'; export type LocatorStrategy = { kind: 'root'; } | { kind: 'label'; value: string; exact?: boolean; } | { kind: 'testId'; value: string; } | { kind: 'text'; value: string | RegExp; exact?: boolean; } | { kind: 'type'; value: string; } | { kind: 'role'; value: string; name?: string | RegExp; } | { kind: 'placeholder'; value: string; exact?: boolean; } | { kind: 'webview'; testId?: string; } | { kind: 'chain'; parent: LocatorStrategy; child: LocatorStrategy; } | { kind: 'nth'; parent: LocatorStrategy; index: number; } | { kind: 'filter'; parent: LocatorStrategy; hasText?: string | RegExp; hasNotText?: string | RegExp; has?: LocatorStrategy; hasNot?: LocatorStrategy; } | { kind: 'and'; left: LocatorStrategy; right: LocatorStrategy; } | { kind: 'or'; left: LocatorStrategy; right: LocatorStrategy; }; /** * Query all ViewNodes in a tree that match a locator strategy. * Returns matching nodes in document order. */ export declare function queryAll(roots: ViewNode[], strategy: LocatorStrategy): ViewNode[]; export declare const WEBVIEW_TYPES: Set; export declare const ROLE_TYPE_MAP: { readonly button: readonly ["button", "imagebutton", "floatingactionbutton", "materialbutton", "appcompatbutton"]; readonly textfield: readonly ["textfield", "securetextfield", "searchfield", "edittext", "appcompatedittext", "textinputedittext", "reactedittext"]; readonly text: readonly ["statictext", "textview", "appcompattextview", "materialtextview", "text", "reacttextview"]; readonly image: readonly ["image", "imageview", "appcompatimageview", "shapeableimageview", "reactimageview"]; readonly switch: readonly ["switch", "toggle", "togglebutton"]; readonly checkbox: readonly ["checkbox"]; readonly radio: readonly ["radio", "radiobutton", "appcompatradiobutton"]; readonly slider: readonly ["slider", "seekbar"]; readonly progressbar: readonly ["progressindicator", "activityindicator", "progressbar"]; readonly alert: readonly ["alert", "sheet"]; readonly combobox: readonly ["picker", "pickerwheel", "spinner", "appcompatspinner"]; readonly list: readonly ["table", "collectionview", "listview", "recyclerview", "scrollview", "reactscrollview"]; readonly listitem: readonly ["cell", "linearlayout", "relativelayout", "other"]; readonly tab: readonly ["tab", "tabbar"]; readonly link: readonly ["link"]; readonly header: readonly ["navigationbar", "toolbar", "header"]; }; /** * Semantic UI roles understood by mobilewright. Inspired by ARIA but adapted * for native iOS / Android / RN widget vocabularies — not a 1:1 subset of W3C * ARIA (e.g. mobilewright uses `textfield`, not ARIA's `textbox`). */ export type Role = keyof typeof ROLE_TYPE_MAP; /** * Reduce a raw native type to the bare name ROLE_TYPE_MAP is keyed on, so a single * getByRole works across platforms. mobilecli reports types verbatim: Android keeps * the full package path ("android.widget.EditText") and iOS may keep the * "XCUIElementType" prefix ("XCUIElementTypeTextField"). getByType still matches the * raw type — only role resolution normalizes. */ export declare function bareTypeName(type: string): string; //# sourceMappingURL=query-engine.d.ts.map