forked from enviPath/enviPy
Current Dev State
This commit is contained in:
32
static/js/ketcher2/node_modules/webdriverio/lib/commands/getGeoLocation.js
generated
vendored
Normal file
32
static/js/ketcher2/node_modules/webdriverio/lib/commands/getGeoLocation.js
generated
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
/**
|
||||
*
|
||||
* Get the current geolocation.
|
||||
*
|
||||
* <example>
|
||||
:getGeoLocation.js
|
||||
it('should return my current location', function () {
|
||||
var location = browser.getGeoLocation()
|
||||
console.log(location)
|
||||
// outputs:
|
||||
// {
|
||||
// latitude: 51.1045407,
|
||||
// longitude: 13.2017384,
|
||||
// altitude: 20.23345
|
||||
// }
|
||||
})
|
||||
* </example>
|
||||
*
|
||||
* @alias browser.getGeoLocation
|
||||
* @return {Object} the current geo location (`{latitude: number, longitude: number, altitude: number}`)
|
||||
* @uses protocol/location
|
||||
* @type mobile
|
||||
*
|
||||
*/
|
||||
|
||||
let getGeoLocation = function () {
|
||||
return this.unify(this.location(), {
|
||||
extractValue: true
|
||||
})
|
||||
}
|
||||
|
||||
export default getGeoLocation
|
||||
Reference in New Issue
Block a user