UNPKG

appium-android-driver

Version:

Android UiAutomator and Chrome support for Appium

47 lines 2.22 kB
import type { StringRecord } from '@appium/types'; import type { AndroidDriver } from '../driver'; import type { StatusBarCommand, WindowProperties } from './types'; /** * Gets the system bars (status bar and navigation bar) properties. * * @returns Promise that resolves to an object containing statusBar and navigationBar properties. * @throws {Error} If system bars details cannot be retrieved or parsed. */ export declare function getSystemBars(this: AndroidDriver): Promise<StringRecord>; /** * Performs a status bar command. * * @param command The status bar command to perform. * @param component The name of the tile component. * It is only required for `(add|remove|click)Tile` commands. * Example value: `com.package.name/.service.QuickSettingsTileComponent` * @returns Promise that resolves to the command output string. * @throws {errors.InvalidArgumentError} If the command is unknown. */ export declare function mobilePerformStatusBarCommand(this: AndroidDriver, command: StatusBarCommand, component?: string): Promise<string>; /** * Parses window properties from adb dumpsys output * * @param name The name of the window whose properties are being parsed * @param props The list of particular window property lines. * Check the corresponding unit tests for more details on the input format. * @returns Parsed properties object * @throws {Error} If there was an issue while parsing the properties string */ export declare function parseWindowProperties(this: AndroidDriver, name: string, props: string[]): WindowProperties; /** * Extracts status and navigation bar information from the window manager output. * * @param lines Output from dumpsys command. * Check the corresponding unit tests for more details on the input format. * @return An object containing two items where keys are statusBar and navigationBar, * and values are corresponding WindowProperties objects * @throws {Error} If no window properties could be parsed */ export declare function parseWindows(this: AndroidDriver, lines: string): SystemBarsResult; interface SystemBarsResult { statusBar?: WindowProperties; navigationBar?: WindowProperties; } export {}; //# sourceMappingURL=system-bars.d.ts.map