Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
chromeOptions: {
androidPackage: this.apkInfo.package,
androidUseRunningApp: true,
androidDeviceSerial: this.udid,
androidProcess: this.apkInfo.androidProcess
}
});
}
this.chromedriver.on(ChromeDriver.BIN_READY, data => {
logger.info(`chromedriver bin file ready: ${data}`);
});
this.chromedriver.on(ChromeDriver.EVENT_READY, data => {
logger.info(`chromedriver ready with: ${JSON.stringify(data)}`);
resolve('');
});
this.chromedriver.on(ChromeDriver.EVENT_ERROR, data => {
logger.error(`chromedriver error with: ${data}`);
reject(data);
});
logger.info('starting chromedriver service!');
this.chromedriver.start({
chromeOptions: {
androidPackage: this.apkInfo.package,
androidUseRunningApp: true,
androidDeviceSerial: this.udid,
androidProcess: this.apkInfo.androidProcess
}
});
});
};
return new Promise((resolve, reject) => {
this.chromedriver = new ChromeDriver();
this.chromedriver.on(ChromeDriver.EVENT_READY, data => {
logger.info(`chromedriver ready with: ${JSON.stringify(data)}`);
resolve('');
});
this.chromedriver.on(ChromeDriver.EVENT_ERROR, err => {
logger.debug(`chromedriver failed to start: ${err}`);
reject(err);
});
this.chromedriver.start(caps);
});
};
this.chromedriver = new ChromeDriver(options);
if (this.chromedriver.binPathReady) {
logger.info('starting chromedriver service!');
this.chromedriver.start({
chromeOptions: {
androidPackage: this.apkInfo.package,
androidUseRunningApp: true,
androidDeviceSerial: this.udid,
androidProcess: this.apkInfo.androidProcess
}
});
}
this.chromedriver.on(ChromeDriver.BIN_READY, data => {
logger.info(`chromedriver bin file ready: ${data}`);
});
this.chromedriver.on(ChromeDriver.EVENT_READY, data => {
logger.info(`chromedriver ready with: ${JSON.stringify(data)}`);
resolve('');
});
this.chromedriver.on(ChromeDriver.EVENT_ERROR, data => {
logger.error(`chromedriver error with: ${data}`);
reject(data);
});
logger.info('starting chromedriver service!');
this.chromedriver.start({
chromeOptions: {
androidPackage: this.apkInfo.package,
androidUseRunningApp: true,
androidDeviceSerial: this.udid,
androidProcess: this.apkInfo.androidProcess
return new Promise((resolve, reject) => {
this.chromedriver = new ChromeDriver();
this.chromedriver.on(ChromeDriver.EVENT_READY, data => {
logger.info(`chromedriver ready with: ${JSON.stringify(data)}`);
resolve('');
});
this.chromedriver.on(ChromeDriver.EVENT_ERROR, err => {
logger.debug(`chromedriver failed to start: ${err}`);
reject(err);
});
this.chromedriver.start(caps);
});
};
return new Promise((resolve, reject) => {
this.chromedriver = new ChromeDriver(options);
if (this.chromedriver.binPathReady) {
logger.info('starting chromedriver service!');
this.chromedriver.start({
chromeOptions: {
androidPackage: this.apkInfo.package,
androidUseRunningApp: true,
androidDeviceSerial: this.udid,
androidProcess: this.apkInfo.androidProcess
}
});
}
this.chromedriver.on(ChromeDriver.BIN_READY, data => {
logger.info(`chromedriver bin file ready: ${data}`);
});
this.chromedriver.on(ChromeDriver.EVENT_READY, data => {
logger.info(`chromedriver ready with: ${JSON.stringify(data)}`);
resolve('');
});
this.chromedriver.on(ChromeDriver.EVENT_ERROR, data => {
logger.error(`chromedriver error with: ${data}`);
reject(data);
});
logger.info('starting chromedriver service!');
this.chromedriver.start({
chromeOptions: {
androidPackage: this.apkInfo.package,