forked from enviPath/enviPy
Current Dev State
This commit is contained in:
28
static/js/ketcher2/node_modules/webdriverio/lib/commands/setGeoLocation.js
generated
vendored
Normal file
28
static/js/ketcher2/node_modules/webdriverio/lib/commands/setGeoLocation.js
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
*
|
||||
* Set the current geo location.
|
||||
*
|
||||
* @alias browser.setGeoLocation
|
||||
* @param {Object} location the new location (`{latitude: number, longitude: number, altitude: number}`)
|
||||
* @uses protocol/location
|
||||
* @type mobile
|
||||
*
|
||||
*/
|
||||
|
||||
import { CommandError } from '../utils/ErrorHandler'
|
||||
|
||||
let setGeoLocation = function (location) {
|
||||
/*!
|
||||
* parameter check
|
||||
*/
|
||||
if (typeof location !== 'object' ||
|
||||
location.latitude === undefined ||
|
||||
location.longitude === undefined ||
|
||||
location.altitude === undefined) {
|
||||
throw new CommandError('location object need to have a latitude, longitude and altitude attribute')
|
||||
}
|
||||
|
||||
return this.location(location)
|
||||
}
|
||||
|
||||
export default setGeoLocation
|
||||
Reference in New Issue
Block a user