How to use the appium-adb.createADB function in appium-adb

To help you get started, we’ve selected a few appium-adb 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 appium / appium-uiautomator2-driver / test / functional / driver-e2e-specs.js View on Github external
async function killServer (adbPort) {
  if (!process.env.TESTOBJECT_E2E_TESTS) {
    let adb = await ADB.createADB({adbPort});
    await adb.killServer();
    if (process.env.CI) {
      // on Travis this takes a while to get into a good state
      await B.delay(10000);
    }
  }
}
github appium / appium-uiautomator2-driver / test / functional / helpers / session.js View on Github external
async function initSession (caps, adbPort) {
  if (TRAVIS && !CLOUD) {
    let adb = await ADB.createADB({adbPort});
    try {
      // on Travis, sometimes we get the keyboard dying and the screen stuck
      await adb.forceStop('com.android.inputmethod.latin');
      await adb.shell(['pm', 'clear', 'com.android.inputmethod.latin']);
    } catch (ign) {}
  }

  if (CLOUD) {
    // on cloud tests, we want to set the `name` capability
    if (!caps.name) {
      caps.name = process.env.SAUCE_JOB_NAME || process.env.TRAVIS_JOB_NUMBER || 'unnamed';
    }
  }

  // Create a WD driver
  const host = getHost();
github appium / appium-android-driver / lib / android-helpers.js View on Github external
// this list should be updated as ADB takes more arguments
  const {
    adbPort,
    suppressKillServer,
    remoteAdbHost,
    clearDeviceLogsOnStart,
    adbExecTimeout,
    useKeystore,
    keystorePath,
    keystorePassword,
    keyAlias,
    keyPassword,
    remoteAppsCacheLimit,
    buildToolsVersion,
  } = opts;
  return await ADB.createADB({
    adbPort,
    suppressKillServer,
    remoteAdbHost,
    clearDeviceLogsOnStart,
    adbExecTimeout,
    useKeystore,
    keystorePath,
    keystorePassword,
    keyAlias,
    keyPassword,
    remoteAppsCacheLimit,
    buildToolsVersion,
  });
};
github appium-boneyard / appium-android-bootstrap / test / functional / bootstrap-e2e-specs.js View on Github external
before(async function () {
    adb = await ADB.createADB();
    const packageName = 'io.appium.android.apis',
          activityName = '.ApiDemos';
    await adb.install(apiDemos);
    await adb.startApp({pkg: packageName,
                        activity: activityName});
    androidBootstrap = new AndroidBootstrap(adb, systemPort);
    await androidBootstrap.start('io.appium.android.apis', false);
  });
  after(async function () {
github appium / appium-android-driver / test / functional / android-helper-e2e-specs.js View on Github external
before(async function () {
    adb = await ADB.createADB();
  });
  describe('installApk', function () {
github appium / appium-android-driver / test / functional / bootstrap / bootstrap-e2e-specs.js View on Github external
before(async function () {
    adb = await ADB.createADB();
    const packageName = 'io.appium.android.apis',
          activityName = '.ApiDemos';
    await adb.uninstallApk('io.appium.android.apis');
    await adb.install(apiDemos);
    await adb.startApp({pkg: packageName,
                        activity: activityName});
    androidBootstrap = new AndroidBootstrap(adb, systemPort);
    await androidBootstrap.start('io.appium.android.apis', false);
  });
  after(async function () {
github NetrisTV / ws-scrcpy / src / server / ServerDeviceConnection.ts View on Github external
private async getOrCreateAdb(udid: string): Promise {
        let adb = this.adbList[udid];
        if (!adb) {
            adb = await ADB.createADB();
            adb.setDeviceId(udid);
            this.adbList[udid] = adb;
        }
        return adb;
    }
    private async getDevices_(): Promise {
github NetrisTV / ws-scrcpy / src / server / ServerDeviceConnection.ts View on Github external
constructor(private readonly log: logger) {
        super();
        this.adbPromise = ADB.createADB();
        this.updatePromise = this.getDevices_();
    }
    private async getAdb(): ADB {

appium-adb

Android Debug Bridge interface

Apache-2.0
Latest version published 10 days ago

Package Health Score

80 / 100
Full package analysis