diff --git a/lib/driver.js b/lib/driver.js index 1d39c253b..21b1facbb 100644 --- a/lib/driver.js +++ b/lib/driver.js @@ -255,9 +255,6 @@ export class XCUITestDriver extends BaseDriver { /** @type {import('./commands/pcap').TrafficCapture|null} */ _trafficCapture; - /** @type {boolean} */ - skipDeviceCheck; - /** @type {Simulator|RealDevice} */ _device; @@ -326,13 +323,6 @@ export class XCUITestDriver extends BaseDriver { this.appInfosCache = new AppInfosCache(this.log); this.remote = null; this.doesSupportBidi = true; - - // Whether to skip the device check in a new session request. - // This is a workaround for network-connected devices such as an Apple TV 4k tvOS 17+ real device. - // A situation that requires this capability may have an issue with communicating with the device - // over appium-ios-device for example. - // Please remove this capability when we no longer need this workaround. - this.skipDeviceCheck = this.opts.skipDeviceCheck || false; } async onSettingsUpdate(key, value) { @@ -632,7 +622,12 @@ export class XCUITestDriver extends BaseDriver { await this.installAUT(); // if we only have bundle identifier and no app, fail if it is not already installed. - if (this.skipDeviceCheck) { + if (!!this.opts.skipDeviceCheck) { + // Whether to skip the device check in a new session request. + // This is a workaround for network-connected devices such as an Apple TV 4k tvOS 17+ real device. + // A situation that requires this capability may have an issue with communicating with the device + // over appium-ios-device for example. + // Please remove this capability when we no longer need this workaround. this.log.debug(`Skipping ${this.opts.bundleId} installation check since skipDeviceCheck was given.`); } else if ( !this.opts.app && @@ -1596,7 +1591,7 @@ export class XCUITestDriver extends BaseDriver { return; } - if (this.opts.bundleId && this.skipDeviceCheck) { + if (this.opts.bundleId && !!this.opts.skipDeviceCheck) { this.log.debug('Skipping the bundle id installation check'); return; }