Device actions
Mock Location
Tells the phone it is somewhere it is not.
device.geo
The piece
Set a fake GPS location. Works on Android real devices, and on iOS 16.4 or newer. Older iPhones/iPads are refused by WebDriverAgent — the step reports whether it actually applied.
Reach for it when
- Store finders, delivery radii, region-gated content.
- Anything that behaves differently in another country.
Mock Location
Idle
In the bag
Every setting this block has. A field marked only when appears once you have chosen the mode above it — those are alternatives to each other, not extra things to fill in.
- LatitudeRequiredstarts at 0
-90 to 90
- LongitudeRequiredstarts at 0
-180 to 180
Build it
Give it a latitude and a longitude
Mock LocationSettings Latitude-90 to 9037.5665Longitude-180 to 180126.9780Set it before the app asks
Apps usually read location once, on the screen that needs it. Put this ahead of that screen, not on it.
mock GPS fix
What comes out
- Whether the location was actually applied on this device.
Watch out
- Android real devices, and iOS 16.4 or newer — the floor is WebDriverAgent's, and it names that version when it refuses. An older iPhone reports the step as not applied rather than failing, so a mixed run does not break over it.
- It moves the phone, not the app's cache. An app that already fetched a location keeps showing it until something makes it ask again.
Usually next to