mirror of
https://github.com/appium/appium.git
synced 2026-10-26 02:29:38 +08:00
Fix android multiple devices: android/android-common.js
This commit is contained in:
@@ -63,12 +63,12 @@ androidCommon.prepareActiveDevice = function(cb) {
|
||||
this.adb.getDevicesWithRetry(function(err, devices) {
|
||||
if (err) return cb(err);
|
||||
var deviceId = null;
|
||||
if (this.udid) {
|
||||
if (!_.contains(_.pluck(devices, 'udid'), this.udid)) {
|
||||
return cb(new Error("Device " + this.udid + " was not in the list " +
|
||||
if (this.adb.udid) {
|
||||
if (!_.contains(_.pluck(devices, 'udid'), this.adb.udid)) {
|
||||
return cb(new Error("Device " + this.adb.udid + " was not in the list " +
|
||||
"of connected devices"));
|
||||
}
|
||||
deviceId = this.udid;
|
||||
deviceId = this.adb.udid;
|
||||
} else {
|
||||
deviceId = devices[0].udid;
|
||||
var emPort = this.adb.getPortFromEmulatorString(deviceId);
|
||||
|
||||
Reference in New Issue
Block a user