appium-ios-simulator
Version:
iOS Simulator interface for Appium.
17 lines (13 loc) • 565 B
text/typescript
import type { CoreSimulator, SupportsGeolocation } from '../types';
type CoreSimulatorWithGeolocation = CoreSimulator & SupportsGeolocation;
/**
* Sets the geolocation for the simulator.
*
* @param latitude The latitude coordinate.
* @param longitude The longitude coordinate.
* @returns True if the geolocation was set successfully.
*/
export async function setGeolocation(this: CoreSimulatorWithGeolocation, latitude: string | number, longitude: string | number): Promise<boolean> {
await this.simctl.setLocation(latitude, longitude);
return true;
}