mirror of
https://github.com/appium/appium.git
synced 2026-10-29 04:36:39 +08:00
+2
-9
@@ -24,6 +24,7 @@ var DT_IOS = "ios"
|
||||
|
||||
var Appium = function (args) {
|
||||
this.args = args;
|
||||
this.args.fastReset = !this.args.fullReset && !this.args.noReset;
|
||||
this.serverArgs = _.clone(args);
|
||||
this.rest = null;
|
||||
this.webSocket = null;
|
||||
@@ -34,8 +35,6 @@ var Appium = function (args) {
|
||||
this.oldDesiredCapabilities = {};
|
||||
this.session = null;
|
||||
this.preLaunched = false;
|
||||
this.fastReset = !this.args.fullReset && !this.args.noReset;
|
||||
this.args.fastReset = this.fastReset;
|
||||
this.sessionOverride = this.args.sessionOverride;
|
||||
this.resetting = false;
|
||||
this.defCommandTimeoutMs = this.args.defaultCommandTimeout * 1000;
|
||||
@@ -372,10 +371,7 @@ Appium.prototype.reset = function (cb) {
|
||||
this.device.fastReset(function (err) {
|
||||
jwpResponse(err, cb);
|
||||
});
|
||||
} else if (!this.args.fastReset &&
|
||||
typeof this.device.fullReset === "function") {
|
||||
logger.info("Running full reset on device");
|
||||
} else if (!this.args.fastReset) {
|
||||
} else {
|
||||
logger.info("Running generic full reset");
|
||||
var oldImpWait = this.device.implicitWaitMs
|
||||
, oldCommandTimeoutMs = this.commandTimeoutMs
|
||||
@@ -392,9 +388,6 @@ Appium.prototype.reset = function (cb) {
|
||||
this.setCommandTimeout(oldCommandTimeoutMs / 1000, cb);
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
} else {
|
||||
logger.warn("No reset strategy available");
|
||||
jwpResponse(cb);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user