UNPKG

appium-xcuitest-driver

Version:

Appium driver for iOS using XCUITest for backend

37 lines 1.81 kB
import type { XCUITestDriver } from '../driver'; export interface GeolocationInfo { /** Measurement of distance north or south of the Equator, or `null` if {@linkcode XCUITestDriver.mobileSetSimulatedLocation} has not been called or {@linkcode mobileResetSimulatedLocation} has been called. */ latitude: number | null; /** Measurement of distance east or west of the prime meridian, or `null` if {@linkcode XCUITestDriver.mobileSetSimulatedLocation} has not been called or {@linkcode mobileResetSimulatedLocation} has been called. */ longitude: number | null; } /** * Retrieves the simulated geolocation value. * Only works since Xcode 14.3/iOS 16.4 * * @returns The current simulated geolocation * @throws If the device under test does not support geolocation simulation. * @since 4.18 */ export declare function mobileGetSimulatedLocation(this: XCUITestDriver): Promise<GeolocationInfo>; /** * Sets simulated geolocation value. * Only works since Xcode 14.3/iOS 16.4 * * @param latitude - Latitude value * @param longitude - Longitude value * @throws If the device under test does not support geolocation simulation. * @since 4.18 */ export declare function mobileSetSimulatedLocation(this: XCUITestDriver, latitude: number, longitude: number): Promise<void>; /** * Resets simulated geolocation value. * Only works since Xcode 14.3/iOS 16.4. * ! Do not forget to reset the simulated geolocation value after your automated test is finished. * ! If the value is not reset explicitly then the simulated one will remain until the next device restart. * * @throws If the device under test does not support geolocation simulation. * @since 4.18 */ export declare function mobileResetSimulatedLocation(this: XCUITestDriver): Promise<void>; //# sourceMappingURL=geolocation.d.ts.map