Skip to content

Commit

Permalink
chore: skip connected device check if the caps had webDriverAgentUrl (#…
Browse files Browse the repository at this point in the history
…2351)

* chore: skip connected device check if the caps had webDriverAgentUrl

* fix lint

* Update driver.js

* Update driver.js
  • Loading branch information
KazuCocoa committed Mar 25, 2024
1 parent 8cb2554 commit 218a0fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/driver.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 218a0fc

Please sign in to comment.