diff --git a/lib/driver.js b/lib/driver.js index 010771f38..3573ad2a7 100644 --- a/lib/driver.js +++ b/lib/driver.js @@ -1221,8 +1221,10 @@ class XCUITestDriver extends BaseDriver { return {device, realDevice: false, udid: device.udid}; } } else { - if (this.skipDeviceCheck()) { - this.log.info(`Skipping connected device check. Using the given udid ${this.opts.udid}.`); + // If the session specified this.opts.webDriverAgentUrl with a real device, + // we can assume the user prepared the device properly already. + if (this.opts.webDriverAgentUrl) { + this.logs.debug('Skipping checking of the device availability since the session specifies appium:webDriverAgentUrl'); } else { // make sure it is a connected device. If not, the udid passed in is invalid const devices = await getConnectedDevices();