Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async startWda (sessionId, realDevice) {
this.wda = new WebDriverAgent(this.xcodeVersion, this.opts);
// Don't cleanup the processes if webDriverAgentUrl is set
if (!util.hasValue(this.wda.webDriverAgentUrl)) {
await this.wda.cleanupObsoleteProcesses();
}
const usePortForwarding = this.isRealDevice()
&& !this.wda.webDriverAgentUrl
&& isLocalHost(this.wda.wdaBaseUrl);
await DEVICE_CONNECTIONS_FACTORY.requestConnection(this.opts.udid, this.wda.url.port, {
devicePort: this.wda.wdaRemotePort,
usePortForwarding,
});
// Let multiple WDA binaries with different derived data folders be built in parallel
// Concurrent WDA builds from the same source will cause xcodebuild synchronization errors