Files
enviPy-bayer/static/js/ketcher2/node_modules/webdriverio/lib/commands/setGeoLocation.js
2025-06-23 20:13:54 +02:00

29 lines
721 B
JavaScript

/**
*
* 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