How to use the appium-base-driver.errors.NoSuchDriverError function in appium-base-driver

To help you get started, we’ve selected a few appium-base-driver 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 truongsinh / appium-flutter-driver / driver / lib / driver.ts View on Github external
// There are 2 CommandTimeout (FlutterDriver and proxy)
        // Only FlutterDriver CommandTimeout is used; Proxy is disabled
        // All proxy commands needs to reset the FlutterDriver CommandTimeout
        // Here we manually reset the FlutterDriver CommandTimeout for commands that goe to proxy.
        this.clearNewCommandTimeout();
        const result = this.proxydriver.executeCommand(cmd, ...args);
        this.startNewCommandTimeout(cmd);
        return result;
      } else {
        logger.debug(`Executing Flutter driver command '${cmd}'`);
        return super.executeCommand(cmd, ...args);
      }
    } else {
      logger.debug(`Command Error '${cmd}'`);
      throw new errors.NoSuchDriverError(
        `Driver is not ready, cannot execute ${cmd}.`,
      );
    }
  }
github appium / appium-ios-driver / lib / driver.js View on Github external
async executeCommand (cmd, ...args) {
    logger.debug(`Executing iOS command '${cmd}'`);
    if (cmd === 'receiveAsyncResponse') {
      return await this.receiveAsyncResponse(...args);
    } else if (this.ready || _.includes(['launchApp'], cmd)) {
      return await super.executeCommand(cmd, ...args);
    }

    throw new errors.NoSuchDriverError(`Driver is not ready, cannot execute ${cmd}.`);
  }