How to use the node-simctl.createDevice function in node-simctl

To help you get started, we’ve selected a few node-simctl 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-ios-simulator / test / functional / settings-e2e-specs.js View on Github external
before(async function () {
    udid = await simctl.createDevice('ios-simulator testing',
                                      deviceType.device,
                                      deviceType.version,
                                      {timeout: 20000});
    // just need a little more space in the logs
    console.log('\n\n'); // eslint-disable-line no-console
  });
github appium / appium-remote-debugger / test / functional / safari-e2e-specs.js View on Github external
before(async function () {
    sim = await getExistingSim(DEVICE_NAME, PLATFORM_VERSION);
    if (!sim) {
      const udid = await createDevice(SIM_NAME, DEVICE_NAME, PLATFORM_VERSION);
      sim = await getSimulator(udid);
      simCreated = true;
    }
    // on certain system, particularly Xcode 11 on Travis, starting the sim fails
    await retry(4, async function () {
      try {
        await sim.run({
          startupTimeout: 60000,
        });
      } catch (err) {
        await sim.shutdown();
        throw err;
      }
    });

    const port = await startHttpServer();
github appium / appium-xcuitest-driver / test / functional / driver / webdriveragent-derived-data-path-e2e-specs.js View on Github external
before(async function () {
    const udid = await createDevice(
      SIM_DEVICE_NAME,
      translateDeviceName(UICATALOG_SIM_CAPS.platformVersion, UICATALOG_SIM_CAPS.deviceName),
      UICATALOG_SIM_CAPS.platformVersion
    );
    baseCaps = Object.assign({}, UICATALOG_SIM_CAPS, {udid});
    caps = Object.assign({
      usePrebuiltWDA: true,
      agentPath: path.join(TEMP_FOLDER, 'WebDriverAgent.xcodeproj'),
      derivedDataPath: path.join(TEMP_FOLDER, 'DerivedData', 'WebDriverAgent')
    }, baseCaps);
    // copy existing WebDriverAgent to the selected derivedDataPath folder
    const wda_path = path.join(process.cwd(), 'WebDriverAgent');
    fs.symlinkSync(wda_path, TEMP_FOLDER);
  });
  after(async function () {
github appium / appium-xcuitest-driver / test / functional / driver / webdriveragent-e2e-specs.js View on Github external
before(async function () {
      let simUdid = await createDevice(
        SIM_DEVICE_NAME,
        translateDeviceName(PLATFORM_VERSION, DEVICE_NAME),
        PLATFORM_VERSION
      );
      device = await getSimulator(simUdid);
    });
github appium / appium-xcuitest-driver / test / functional / driver / driver-e2e-specs.js View on Github external
async function createDevice () {
  return await createDeviceNodeSimctl(
    SIM_DEVICE_NAME,
    translateDeviceName(UICATALOG_SIM_CAPS.platformVersion, UICATALOG_SIM_CAPS.deviceName),
    UICATALOG_SIM_CAPS.platformVersion
  );
}
github appium / appium-ios-simulator / test / functional / utils-e2e-specs.js View on Github external
beforeEach(async function () {
    await killAllSimulators();
    let udid = await simctl.createDevice('ios-simulator testing',
                                         'iPhone 6s',
                                         deviceVersion,
                                         {timeout: 20000});
    sim = await getSimulator(udid);
    await sim.run({startupTimeout: LONG_TIMEOUT});
  });
  afterEach(async function () {
github appium / appium-ios-simulator / test / functional / simulator-e2e-specs.js View on Github external
before(async function () {
      if (_.isEmpty(xcodeVersion)) {
        xcodeVersion = await xcode.getVersion(true);
      }
      if (xcodeVersion.major < 9) {
        return this.skip();
      }

      await killAllSimulators();

      for (let i = 0; i < DEVICES_COUNT; i++) {
        const udid = await simctl.createDevice(`ios-simulator_${i}_testing`,
                                               deviceType.device,
                                               deviceType.version);
        simulatorsMapping[udid] = await getSimulator(udid);
      }
    });
    after(async function () {
github appium / appium-ios-simulator / test / functional / simulator-e2e-specs.js View on Github external
before(async function () {
      await killAllSimulators();
      let udid = await simctl.createDevice('ios-simulator testing',
                                           deviceType.device,
                                           deviceType.version);
      sim = await getSimulator(udid);
      await sim.run({
        startupTimeout: LONG_TIMEOUT,
      });
    });
    after(async function () {
github erha19 / weex-debugger / src / util / simrun.js View on Github external
function createDevice(prefix, deviceType) {
  return simctl.createDevice(
    prefix + " " + deviceType,
    deviceType,
    getRuntime()
  );
}