UNPKG

appium-xcuitest-driver

Version:

Appium driver for iOS using XCUITest for backend

23 lines 983 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.removeAllSessionWebSocketHandlers = removeAllSessionWebSocketHandlers; exports.shouldSetInitialSafariUrl = shouldSetInitialSafariUrl; /** * Stops and removes all web socket handlers that are listening * in scope of the current session. */ async function removeAllSessionWebSocketHandlers() { if (!this.sessionId || typeof this.server?.getWebSocketHandlers !== 'function') { return; } const activeHandlers = await this.server.getWebSocketHandlers(this.sessionId); for (const pathname of Object.keys(activeHandlers)) { await this.server.removeWebSocketHandler(pathname); } } /** Whether the initial Safari URL should be pushed at session start. */ function shouldSetInitialSafariUrl(opts) { return (!(opts.safariInitialUrl === '' || (opts.noReset && opts.safariInitialUrl == null)) && !opts.initialDeeplinkUrl); } //# sourceMappingURL=session.js.map