In a mobile app test, arbitrary position information may be set on the device.
On this page, we shall explain how to set the position information.
How to set position information
Click “Detail” > ”Device Geolocation” >"Edit on map" on the test target specification panel.
A pop-up window will then appear. Set the latitude and longitude of the location information by entering numerical values or clicking on the map.
During a test
Add a step from "System" > "Set geolocation" in the command list. From the "Edit" button on the step, you can edit its latitude/longitude. To set it, click on the map or enter a numerical value. Note that the "Name" field is for identification purposes only and does not affect the test itself.
Points to note
How to set iOS simulator position information in the local environment
If position information is set on the iOS simulator in the local environment, it is necessary to install an external library using the following procedure.
- Open the Mac terminal.
- Copy the following command:
brew install lyft/formulae/set-simulator-location
- Paste the copied command to the terminal, and press the Return key to run.
If you encounter "kCLErrorDomain error" in the iOS simulator or iOS cloud device
The following error may occur when executing the command depending on the application under test. In such case, the location information set is still valid regardless of the error. Therefore, testing can continue using that location information after dismissing the message.