appium-xcuitest-driver
Version:
Appium driver for iOS using XCUITest for backend
60 lines • 2.77 kB
TypeScript
export default commands;
export type GeolocationInfo = {
/**
* Measurement of distance north or south of the Equator, or
* `null` if {@linkcode XCUITestDriver.mobileSetSimulatedLocation} has not been called or {@linkcode * resetSimulatedLocation} 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 * resetSimulatedLocation} has been called.
*/
longitude: number | null;
};
export type XCUITestDriver = import("../driver").XCUITestDriver;
export namespace commands {
/**
* @typedef {Object} GeolocationInfo
* @property {number|null} latitude Measurement of distance north or south of the Equator, or
* `null` if {@linkcode XCUITestDriver.mobileSetSimulatedLocation} has not been called or {@linkcode
* resetSimulatedLocation} has been called.
* @property {number|null} longitude Measurement of distance east or west of the prime meridian, or
* `null` if {@linkcode XCUITestDriver.mobileSetSimulatedLocation} has not been called or {@linkcode
* resetSimulatedLocation} has been called.
*/
/**
* Retrieves the simulated geolocation value.
* Only works since Xcode 14.3/iOS 16.4
*
* @returns {Promise<GeolocationInfo>}
* @throws {Error} If the device under test does not support gelolocation simulation.
* @since 4.18
* @this {XCUITestDriver}
*/
function mobileGetSimulatedLocation(this: import("../driver").XCUITestDriver): Promise<GeolocationInfo>;
/**
* Sets simulated geolocation value.
* Only works since Xcode 14.3/iOS 16.4
*
* @param {number} latitude
* @param {number} longitude
* @returns {Promise<void>}
* @throws {Error} If the device under test does not support gelolocation simulation.
* @since 4.18
* @this {XCUITestDriver}
*/
function mobileSetSimulatedLocation(this: import("../driver").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 explcitly then the simulated one will remain until the next device restart.
*
* @returns {Promise<void>}
* @throws {Error} If the device under test does not support gelolocation simulation.
* @since 4.18
* @this {XCUITestDriver}
*/
function mobileResetSimulatedLocation(this: import("../driver").XCUITestDriver): Promise<void>;
}
//# sourceMappingURL=geolocation.d.ts.map