mirror of
https://github.com/appium/appium.git
synced 2026-02-07 01:58:55 -06:00
get rid of 'mobile: location'
This commit is contained in:
@@ -524,32 +524,6 @@ exports.mobileShake = function (req, res) {
|
||||
req.device.shake(getResponseHandler(req, res));
|
||||
};
|
||||
|
||||
exports.mobileSetLocation = function (req, res) {
|
||||
logCustomDeprecationWarning("mobile method", "mobile: location",
|
||||
"mobile: location is deprecated and will be removed");
|
||||
req.body = _.defaults(req.body, {
|
||||
latitude: null
|
||||
, longitude: null
|
||||
, altitude: null
|
||||
, horizontalAccuracy: null
|
||||
, verticalAccuracy: null
|
||||
, course: null
|
||||
, speed: null
|
||||
});
|
||||
var latitude = req.body.latitude
|
||||
, longitude = req.body.longitude
|
||||
, altitude = req.body.altitude
|
||||
, horizontalAccuracy = req.body.horizontalAccuracy
|
||||
, verticalAccuracy = req.body.verticalAccuracy
|
||||
, course = req.body.course
|
||||
, speed = req.body.speed;
|
||||
|
||||
if (checkMissingParams(res, {latitude: latitude, longitude: longitude})) {
|
||||
req.device.setLocation(latitude, longitude, altitude, horizontalAccuracy,
|
||||
verticalAccuracy, course, speed, getResponseHandler(req, res));
|
||||
}
|
||||
};
|
||||
|
||||
exports.hideKeyboard = function (req, res) {
|
||||
var keyName = req.body.keyName;
|
||||
|
||||
@@ -1089,7 +1063,6 @@ var mobileCmdMap = {
|
||||
, 'scrollTo': exports.mobileScrollTo
|
||||
, 'scroll': exports.mobileScroll
|
||||
, 'shake': exports.mobileShake
|
||||
, 'setLocation' : exports.mobileSetLocation
|
||||
, 'hideKeyboard': exports.hideKeyboard
|
||||
, 'setCommandTimeout': exports.setCommandTimeout
|
||||
, 'getCommandTimeout': exports.getCommandTimeout
|
||||
|
||||
Reference in New Issue
Block a user