Set the current geolocation of the mobile device.

Usage

.appium.setGeolocation({latitude, longitude, altitude}, [callback])

Example

Or run locally with:
git clone https://github.com/nightwatchjs/nightwatch-examples.git
cd nightwatch-examples
npm install
npx nightwatch tests/api/setGeolocation.js

Parameters

Name Type description
coordinates
Optional
object

latitude and longitude are required; altitude is optional. All should be of type number.

callback
Optional
function

Optional callback function to be called when the command finishes.

See also