How to use the appium-base-driver.JWProxy 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 appium / appium-xcuitest-driver / test / unit / driver-specs.js View on Github external
beforeEach(function () {
      driver = new XCUITestDriver();

      // fake the proxy to WDA
      const jwproxy = new JWProxy();
      jwproxyCommandSpy = sinon.stub(jwproxy, 'command').callsFake(async function () { // eslint-disable-line require-await
        return {some: 'thing'};
      });
      driver.wda = {
        jwproxy,
      };
    });
github appium / appium-xcuitest-driver / lib / webdriveragent.js View on Github external
setupProxies (sessionId) {
    const proxyOpts = {
      server: this.url.hostname,
      port: this.url.port,
      base: '',
      timeout: this.wdaConnectionTimeout,
    };

    this.jwproxy = new JWProxy(proxyOpts);
    this.jwproxy.sessionId = sessionId;
    this.proxyReqRes = this.jwproxy.proxyReqRes.bind(this.jwproxy);

    this.noSessionProxy = new NoSessionProxy(proxyOpts);
    this.noSessionProxyReqRes = this.noSessionProxy.proxyReqRes.bind(this.noSessionProxy);
  }
github appium / appium-xcuitest-driver / lib / wda / webdriveragent.js View on Github external
setupProxies (sessionId) {
    const proxyOpts = {
      server: this.url.hostname,
      port: this.url.port,
      base: '',
      timeout: this.wdaConnectionTimeout,
      keepAlive: true,
    };

    this.jwproxy = new JWProxy(proxyOpts);
    this.jwproxy.sessionId = sessionId;
    this.proxyReqRes = this.jwproxy.proxyReqRes.bind(this.jwproxy);

    this.noSessionProxy = new NoSessionProxy(proxyOpts);
  }
github appium / appium-chromedriver / lib / chromedriver.js View on Github external
isAutodownloadEnabled = false,
    } = args;

    this.proxyHost = host;
    this.proxyPort = port;
    this.adb = adb;
    this.cmdArgs = cmdArgs;
    this.proc = null;
    this.useSystemExecutable = useSystemExecutable;
    this.chromedriver = executable;
    this.executableDir = executableDir;
    this.mappingPath = mappingPath;
    this.bundleId = bundleId;
    this.executableVerified = false;
    this.state = Chromedriver.STATE_STOPPED;
    this.jwproxy = new JWProxy({server: this.proxyHost, port: this.proxyPort});
    this.verbose = verbose;
    this.logPath = logPath;
    this.disableBuildCheck = !!disableBuildCheck;
    this.storageClient = isAutodownloadEnabled
      ? new ChromedriverStorageClient({ chromedriverDir: this.executableDir })
      : null;
    this.capabilities = {};
    this.desiredProtocol = PROTOCOLS.MJSONWP;
  }
github appium / appium-uiautomator2-driver / lib / uiautomator2.js View on Github external
constructor (opts = {}) {
    for (let req of REQD_PARAMS) {
      if (!opts || !util.hasValue(opts[req])) {
        throw new Error(`Option '${req}' is required!`);
      }
      this[req] = opts[req];
    }
    this.jwproxy = new JWProxy({
      server: this.host,
      port: this.systemPort,
      keepAlive: true,
    });
    this.proxyReqRes = this.jwproxy.proxyReqRes.bind(this.jwproxy);
  }
github appium / appium-mac-driver / lib / appium-for-mac.js View on Github external
constructor () {
    this.proxyHost = DEFAULT_A4M_HOST;
    this.proxyPort = DEFAULT_A4M_PORT;
    this.proc = null;
    this.jwproxy = new JWProxy({server: this.proxyHost, port: this.proxyPort});
  }