UNPKG

appium-xcuitest-driver

Version:

Appium driver for iOS using XCUITest for backend

75 lines 2.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.pageLoadTimeoutW3C = pageLoadTimeoutW3C; exports.pageLoadTimeoutMJSONWP = pageLoadTimeoutMJSONWP; exports.scriptTimeoutW3C = scriptTimeoutW3C; exports.scriptTimeoutMJSONWP = scriptTimeoutMJSONWP; exports.asyncScriptTimeout = asyncScriptTimeout; exports.setPageLoadTimeout = setPageLoadTimeout; exports.setAsyncScriptTimeout = setAsyncScriptTimeout; /** * Sets the page load timeout using W3C protocol. * * @param ms - Timeout in milliseconds */ async function pageLoadTimeoutW3C(ms) { await this.setPageLoadTimeout(this.parseTimeoutArgument(ms)); } /** * Sets the page load timeout using MJSONWP protocol. * * @param ms - Timeout in milliseconds */ async function pageLoadTimeoutMJSONWP(ms) { await this.setPageLoadTimeout(this.parseTimeoutArgument(ms)); } /** * Sets the async script timeout using W3C protocol. * * @param ms - Timeout in milliseconds */ async function scriptTimeoutW3C(ms) { // XXX: this is synchronous await this.setAsyncScriptTimeout(this.parseTimeoutArgument(ms)); } /** * Alias for {@linkcode XCUITestDriver.scriptTimeoutW3C}. * * @param ms - The timeout in milliseconds * @deprecated Use {@linkcode XCUITestDriver.scriptTimeoutW3C} instead */ async function scriptTimeoutMJSONWP(ms) { await this.asyncScriptTimeout(ms); } /** * Alias for {@linkcode XCUITestDriver.scriptTimeoutW3C}. * * @param ms - The timeout in milliseconds * @deprecated Use {@linkcode XCUITestDriver.scriptTimeoutW3C} instead */ async function asyncScriptTimeout(ms) { await this.scriptTimeoutW3C(ms); } /** * Sets the page load timeout. * * @param ms - Timeout in milliseconds */ function setPageLoadTimeout(ms) { ms = parseInt(String(ms), 10); this.pageLoadMs = ms; if (this._remote) { this.remote.pageLoadMs = ms; } this.log.debug(`Set page load timeout to ${ms}ms`); } /** * Sets the async script timeout. * * @param ms - Timeout in milliseconds */ function setAsyncScriptTimeout(ms) { this.asyncWaitMs = ms; this.log.debug(`Set async script timeout to ${ms}ms`); } //# sourceMappingURL=timeouts.js.map