зеркало из https://github.com/microsoft/appium.git
Merge pull request #4840 from imurchie/isaac-real-safari
Fix handling real device object in Safari
This commit is contained in:
Коммит
b0035bede6
|
@ -910,7 +910,9 @@ IOS.prototype.getIDeviceObj = function () {
|
|||
|
||||
IOS.prototype.installIpa = function (cb) {
|
||||
logger.debug("Installing ipa found at " + this.args.ipa);
|
||||
this.realDevice = this.getIDeviceObj();
|
||||
if (!this.realDevice) {
|
||||
this.realDevice = this.getIDeviceObj();
|
||||
}
|
||||
var d = this.realDevice;
|
||||
async.waterfall([
|
||||
function (cb) { d.isInstalled(this.args.bundleId, cb); }.bind(this),
|
||||
|
|
|
@ -115,8 +115,15 @@ Safari.prototype.configureBootstrap = function (cb) {
|
|||
|
||||
Safari.prototype.installToRealDevice = function (cb) {
|
||||
if (this.args.udid) {
|
||||
this.isAppInstalled("com.bytearc.SafariLauncher", function (err) {
|
||||
if (err) {
|
||||
try {
|
||||
if (!this.realDevice) {
|
||||
this.realDevice = this.getIDeviceObj();
|
||||
}
|
||||
} catch (e) {
|
||||
return cb(e);
|
||||
}
|
||||
this.isAppInstalled("com.bytearc.SafariLauncher", function (err, installed) {
|
||||
if (err || !installed) {
|
||||
this.installApp(this.args.app, cb);
|
||||
} else {
|
||||
cb();
|
||||
|
|
Загрузка…
Ссылка в новой задаче