UNPKG

appium-uiautomator2-driver

Version:
28 lines 948 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setUrl = setUrl; exports.mobileDeepLink = mobileDeepLink; exports.back = back; /** * Sets the URL for the current app. * @param url - The URL to navigate to. */ async function setUrl(url) { await this.adb.startUri(url, this.opts.appPackage); } /** * Starts a URL that takes users directly to specific content in the app. * @param url - The deep link URL to start. * @param pkg - Optional package name to start the URI with. If not provided, uses the current app package. * @param waitForLaunch - If false, adb won't wait for the started activity to return control. Defaults to true. */ async function mobileDeepLink(url, pkg, waitForLaunch = true) { return await this.adb.startUri(url, pkg, { waitForLaunch }); } /** * Navigates back in the app. */ async function back() { await this.adb.keyevent(4); } //# sourceMappingURL=navigation.js.map