import { SerializableOrElement } from './driver'; declare const SUPPORTED_LOCATOR_STRATEGIES: readonly ["css selector", "accessibility id", "-android uiautomator", "-ios class chain"]; /** * Mobile locator strategies aren't part of any standard (unlike WebDriver locator strategies). * We use the enumerated attributes found in the appium documentation that are also used in the WDIO codebase * * @see https://github.com/appium/appium-xcuitest-driver#element-location (class chain) * @see https://github.com/appium/appium-uiautomator2-driver#element-location (android uiautomator) * @see http://appium.io/docs/en/writing-running-appium/finding-elements/index.html * @see http://appium.io/docs/en/commands/element/find-elements/index.html#selector-strategies */ type ByStrategies = (typeof SUPPORTED_LOCATOR_STRATEGIES)[number]; export interface ByClass { /** location strategies */ using: ByStrategies; /** selector value */ value: string; toString: () => string; } declare class By implements ByClass { using: ByStrategies; value: string; constructor(using: string, value: string); validateStrategy(using: string): ByStrategies; static accessibilityId(selector: string): By; static classChain(selector: string): By; static css(selector: string): By; static uiAutomator(selector: string): By; toString(): string; } declare function checkLocator(locator: By | ByClass | LocatorFunction | Record): Locator | By; type LocatorFunction = (...args: SerializableOrElement[]) => By; type Locator = LocatorFunction | ByClass; export { checkLocator, By }; export type { Locator }; //# sourceMappingURL=by.d.ts.map