UNPKG

appium-android-driver

Version:

Android UiAutomator and Chrome support for Appium

98 lines 4.54 kB
/** * * @param {string} browser * @returns {import('type-fest').ValueOf<typeof CHROME_BROWSER_PACKAGE_ACTIVITY>} */ export function getChromePkg(browser: string): import("type-fest").ValueOf<typeof CHROME_BROWSER_PACKAGE_ACTIVITY>; /** * Parse webview names for getContexts * * @this {import('../../driver').AndroidDriver} * @param {import('../types').WebviewsMapping[]} webviewsMapping * @param {import('../types').GetWebviewsOpts} options * @returns {string[]} */ export function parseWebviewNames(this: import("../../driver").AndroidDriver, webviewsMapping: import("../types").WebviewsMapping[], { ensureWebviewsHavePages, isChromeSession }?: import("../types").GetWebviewsOpts): string[]; /** * Get a list of available webviews mapping by introspecting processes with adb, * where webviews are listed. It's possible to pass in a 'deviceSocket' arg, which * limits the webview possibilities to the one running on the Chromium devtools * socket we're interested in (see note on webviewsFromProcs). We can also * direct this method to verify whether a particular webview process actually * has any pages (if a process exists but no pages are found, Chromedriver will * not actually be able to connect to it, so this serves as a guard for that * strange failure mode). The strategy for checking whether any pages are * active involves sending a request to the remote debug server on the device, * hence it is also possible to specify the port on the host machine which * should be used for this communication. * * @this {import('../../driver').AndroidDriver} * @param {import('../types').GetWebviewsOpts} [opts={}] * @returns {Promise<import('../types').WebviewsMapping[]>} */ export function getWebViewsMapping(this: import("../../driver").AndroidDriver, { androidDeviceSocket, ensureWebviewsHavePages, webviewDevtoolsPort, enableWebviewDetailsCollection, waitForWebviewMs, }?: import("../types").GetWebviewsOpts): Promise<import("../types").WebviewsMapping[]>; /** * @this {import('../../driver').AndroidDriver} * @param {import('../../driver').AndroidDriverOpts} opts * @param {string} curDeviceId * @param {string} [context] * @returns {Promise<Chromedriver>} */ export function setupNewChromedriver(this: import("../../driver").AndroidDriver, opts: import("../../driver").AndroidDriverOpts, curDeviceId: string, context?: string): Promise<Chromedriver>; /** * @this {import('../../driver').AndroidDriver} * @template {Chromedriver} T * @param {T} chromedriver * @returns {Promise<T>} */ export function setupExistingChromedriver<T extends Chromedriver>(this: import("../../driver").AndroidDriver, chromedriver: T): Promise<T>; /** * @this {import('../../driver').AndroidDriver} * @returns {boolean} */ export function shouldDismissChromeWelcome(this: import("../../driver").AndroidDriver): boolean; /** * @this {import('../../driver').AndroidDriver} * @returns {Promise<void>} */ export function dismissChromeWelcome(this: import("../../driver").AndroidDriver): Promise<void>; export const CHROME_BROWSER_PACKAGE_ACTIVITY: { readonly chrome: { readonly pkg: "com.android.chrome"; readonly activity: "com.google.android.apps.chrome.Main"; }; readonly chromium: { readonly pkg: "org.chromium.chrome.shell"; readonly activity: ".ChromeShellActivity"; }; readonly chromebeta: { readonly pkg: "com.chrome.beta"; readonly activity: "com.google.android.apps.chrome.Main"; }; readonly browser: { readonly pkg: "com.android.browser"; readonly activity: "com.android.browser.BrowserActivity"; }; readonly 'chromium-browser': { readonly pkg: "org.chromium.chrome"; readonly activity: "com.google.android.apps.chrome.Main"; }; readonly 'chromium-webview': { readonly pkg: "org.chromium.webview_shell"; readonly activity: "org.chromium.webview_shell.WebViewBrowserActivity"; }; readonly default: { readonly pkg: "com.android.chrome"; readonly activity: "com.google.android.apps.chrome.Main"; }; }; export const CHROME_PACKAGE_NAME: "com.android.chrome"; export const KNOWN_CHROME_PACKAGE_NAMES: string[]; export const NATIVE_WIN: "NATIVE_APP"; export const WEBVIEW_WIN: "WEBVIEW"; export const CHROMIUM_WIN: "CHROMIUM"; export const WEBVIEW_BASE: "WEBVIEW_"; export const DEVTOOLS_SOCKET_PATTERN: RegExp; export type ADB = import("appium-adb").ADB; import { Chromedriver } from 'appium-chromedriver'; //# sourceMappingURL=helpers.d.ts.map