How to use the appium-ios-device.services.startWebInspectorService function in appium-ios-device

To help you get started, we’ve selected a few appium-ios-device 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-remote-debugger / lib / rpc-client-simulator.js View on Github external
this.socket.connect(this.port, this.host);
    }

    this.socket.setNoDelay(true);
    this.socket.setKeepAlive(true);
    this.socket.on('close', () => {
      if (this.connected) {
        log.debug('Debugger socket disconnected');
      }
      this.connected = false;
      this.socket = null;
    });
    this.socket.on('end', () => {
      this.connected = false;
    });
    this.service = await services.startWebInspectorService(this.udid, {
      socket: this.socket,
      isSimulator: true,
      osVersion: this.platformVersion,
      verbose: this.logAllCommunication,
      verboseHexDump: this.logAllCommunicationHexDump,
    });
    this.service.listenMessage(this.receive.bind(this));

    // connect the socket
    return await new B((resolve, reject) => {
      // only resolve this function when we are actually connected
      this.socket.on('connect', () => {
        log.debug(`Debugger socket connected`);
        this.connected = true;

        resolve();
github appium / appium-remote-debugger / lib / rpc-client-real-device.js View on Github external
async connect () {
    this.service = await services.startWebInspectorService(this.udid, {
      osVersion: this.platformVersion,
      isSimulator: false,
      verbose: this.logAllCommunication,
      verboseHexDump: this.logAllCommunicationHexDump,
      socketChunkSize: this.socketChunkSize,
    });

    this.service.listenMessage(this.receive.bind(this));
    this.connected = true;
  }