How to use the appium.main function in appium

To help you get started, we’ve selected a few appium 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-desktop / app / main / appium.js View on Github external
if (batchedLogs.length) {
        try {
          await fs.writeFile(
   => `[${log.level}] ${log.msg}`).join('\n'),
            {flag: 'a'}
          win.webContents.send('appium-log-line', batchedLogs);
        } catch (ign) { }
        batchedLogs.splice(0, batchedLogs.length);

    try {
      // set up the appium server running in this thread
      server = await appiumServer(args, true);
      await settings.set('SERVER_ARGS', args);
    } catch (e) {
      win.webContents.send('appium-start-error', e.message);
      try {
        await server.close();
      } catch (ign) {}