How to use the appium-android-driver.androidHelpers.removeAllSessionWebSocketHandlers function in appium-android-driver

To help you get started, we’ve selected a few appium-android-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-uiautomator2-driver / lib / driver.js View on Github external
async deleteSession () {
    logger.debug('Deleting UiAutomator2 session');
    await androidHelpers.removeAllSessionWebSocketHandlers(this.server, this.sessionId);
    await this.mobileStopScreenStreaming();
    if (this.uiautomator2) {
      try {
        await this.stopChromedriverProxies();
      } catch (err) {
        logger.warn(`Unable to stop ChromeDriver proxies: ${err.message}`);
      }
      if (this.jwpProxyActive) {
        try {
          await this.uiautomator2.deleteSession();
        } catch (err) {
          logger.warn(`Unable to proxy deleteSession to UiAutomator2: ${err.message}`);
        }
      }
      this.uiautomator2 = null;
    }