getGeoLocation

Get the current geolocation.

Usage

1
browser.getGeoLocation();

Example

getGeoLocation.js
1
2
3
4
5
6
7
8
9
10
it('should return my current location', function () {
var location = browser.getGeoLocation()
console.log(location)
// outputs:
// {
// latitude: 51.1045407,
// longitude: 13.2017384,
// altitude: 20.23345
// }
})

Returns

  • <Object>: the current geo location ({latitude: number, longitude: number, altitude: number})

Uses