appium-xcuitest-driver
Version:
Appium driver for iOS using XCUITest for backend
44 lines • 2.27 kB
TypeScript
import _ from 'lodash';
import type { XCUITestDriverOpts, XCUITestDriver } from '../driver';
import type { Simulator } from 'appium-ios-simulator';
import type { RealDevice } from '../device/real-device-management';
export declare const UDID_AUTO = "auto";
export declare const NATIVE_WIN = "NATIVE_APP";
/**
* Stops and removes all web socket handlers that are listening
* in scope of the current session.
*/
export declare function removeAllSessionWebSocketHandlers(this: XCUITestDriver): Promise<void>;
/**
* Requires that the given driver is running on a Simulator and return
* the simulator instance.
*/
export declare function requireSimulator(driver: XCUITestDriver, action: string): Simulator;
/**
* Requires that the given driver is running on a real device and return
* the real device instance.
*/
export declare function requireRealDevice(driver: XCUITestDriver, action: string): RealDevice;
/** Check if platform name is the TV OS one. */
export declare function isTvOs(platformName: string | null | undefined): boolean;
/** Return normalized platform name. */
export declare function normalizePlatformName(platformName: string | null | undefined): string;
/** Normalizes platformVersion to a valid iOS version string. */
export declare function normalizePlatformVersion(originalVersion: string): string;
/** Whether the initial Safari URL should be pushed at session start. */
export declare function shouldSetInitialSafariUrl(opts: XCUITestDriverOpts): boolean;
/** Version-gate helper for iOS 17+ capabilities. */
export declare function isIos17OrNewer(opts: XCUITestDriverOpts): boolean;
/** Platform-version predicate for iOS 17+. */
export declare function isIos17OrNewerPlatform(platformVersion?: string | null): boolean;
/** Platform-version predicate for iOS 18+. */
export declare function isIos18OrNewerPlatform(platformVersion?: string | null): boolean;
/** Version-gate helper for iOS 18+ capabilities. */
export declare function isIos18OrNewer(opts: XCUITestDriverOpts): boolean;
export interface DriverInfo {
version: string;
built: string;
}
/** Gets driver build/version metadata from package manifest. */
export declare const getDriverInfo: (() => Promise<DriverInfo>) & _.MemoizedFunction;
//# sourceMappingURL=driver.d.ts.map