Mobile Studio - Set Device Location
Shared Devices Note
Location Services are disabled by default in a shared device session. To use the Device Location tool in the Mobile Studio, you must first enable Location Services.
For Android, refer to Enable Location Services on Android Devices.
For iOS, refer to Enable Location Services on iOS Devices.
You can set the location for a mobile device by adjusting its Latitude and Longitude.
This is useful for verifying location-based features and behaviors in your Native, Hybrid, or Web Applications.
Setting Device Location
To change the location:
-
Go to Tools and select Device Location.
-
Enter the appropriate Latitude and Longitude values.
-
Click Set Location to apply the changes.
Simulating a Route
You can also use the Set Route option to simulate device movement.
This is useful for scenarios like navigation-based testing, where you need to simulate a route from Point A to Point B.
The Set Route option accepts a .csv file that contain Latitude, Longitude and Altitude values.
Details
Example CSV Files
Latitude, Longitude, Altitude40.785091, -73.968285, 18.38528047
40.77948597, -73.97184672, 15.0510627
40.77201259, -73.97659569, 20.85711776
40.76640755, -73.98015741, 23.64100586
40.76547338, -73.98075103, 21.00687624
You can also set a location programmatically using Appium.
This allows you to automate location-based testing for your applications.
For a list of Digital.ai functions compatible with Appium, refer to the Appium Supported Commands.