How to use the macaca-chromedriver.BIN_READY function in macaca-chromedriver

To help you get started, we’ve selected a few macaca-chromedriver examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github macacajs / macaca-android / lib / macaca-android.js View on Github external
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,

macaca-chromedriver

Node.js wrapper for the selenium chromedriver.

MIT
Latest version published 3 years ago

Package Health Score

36 / 100
Full package analysis