UNPKG

appium-uiautomator2-driver

Version:
36 lines 1.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setUrl = setUrl; exports.mobileDeepLink = mobileDeepLink; exports.back = back; /** * @this {AndroidUiautomator2Driver} * @param {string} url * @returns {Promise<void>} */ async function setUrl(url) { await this.adb.startUri(url, /** @type {string} */ (this.opts.appPackage)); } /** * Start URL that take users directly to specific content in the app * @this {AndroidUiautomator2Driver} * @param {string} url The name of URL to start. * @param {string} [pkg] The name of the package to start the URI with. * @param {boolean} [waitForLaunch=true] If `false` then adb won't wait for * the started activity to return the control. * @returns {Promise<void>} */ async function mobileDeepLink(url, pkg, waitForLaunch) { return await this.adb.startUri(url, pkg, { waitForLaunch }); } /** * @this {AndroidUiautomator2Driver} * @returns {Promise<void>} */ async function back() { await this.adb.keyevent(4); } /** * @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver */ //# sourceMappingURL=navigation.js.map