mirror of
https://github.com/appium/appium.git
synced 2026-02-11 20:39:04 -06:00
launchAndKill checks for simulator directories to be present before finally killing. Fixes 2612
This commit is contained in:
@@ -607,10 +607,15 @@ IOS.prototype.setPreferences = function (cb) {
|
||||
IOS.prototype.instantLaunchAndQuit = function (cb) {
|
||||
logger.debug("Sim files for the " + this.iOSSDKVersion + " SDK do not yet exist, launching the sim " +
|
||||
"to populate the applications and preference dirs");
|
||||
|
||||
var condition = function () {
|
||||
return settings.simDirsExist(this.iOSSDKVersion);
|
||||
}.bind(this);
|
||||
|
||||
this.setDeviceAndLaunchSimulator(function (err) {
|
||||
if (err) return cb(err);
|
||||
this.makeInstruments(function (err, instruments) {
|
||||
instruments.launchAndKill(1000, function (err) {
|
||||
instruments.launchAndKill(condition, function (err) {
|
||||
if (err) return cb(err);
|
||||
this.endSimulator(cb);
|
||||
}.bind(this));
|
||||
|
||||
Reference in New Issue
Block a user