UNPKG

appium-android-driver

Version:

Android UiAutomator and Chrome support for Appium

52 lines 2.8 kB
import type { AndroidDriver } from '../driver'; /** * Pulls a file from the remote device. * * The full path to the remote file or a specially formatted path, which * points to an item inside an app bundle, for example `@my.app.id/my/path`. * It is mandatory for the app bundle to have debugging enabled in order to * use the latter `remotePath` format. * * @param remotePath The full path to the remote file or a specially formatted path, which * points to an item inside an app bundle, for example `@my.app.id/my/path`. * It is mandatory for the app bundle to have debugging enabled in order to * use the latter `remotePath` format. * @returns Promise that resolves to the file content as a base64-encoded string. * @throws {errors.InvalidArgumentError} If the remote path points to a folder instead of a file. */ export declare function pullFile(this: AndroidDriver, remotePath: string): Promise<string>; /** * Pushes a file to the remote device. * * The full path to the remote file or a specially formatted path, which * points to an item inside an app bundle, for example `@my.app.id/my/path`. * It is mandatory for the app bundle to have debugging enabled in order to * use the latter `remotePath` format. * * @param remotePath The full path to the remote file or a specially formatted path, which * points to an item inside an app bundle, for example `@my.app.id/my/path`. * It is mandatory for the app bundle to have debugging enabled in order to * use the latter `remotePath` format. * @param base64Data Base64-encoded content of the file to be pushed. * Can be a string or an array of numbers (for Java clients that send byte arrays). * @returns Promise that resolves when the file is pushed. * @throws {errors.InvalidArgumentError} If the remote path points to a folder instead of a file. */ export declare function pushFile(this: AndroidDriver, remotePath: string, base64Data: string | number[]): Promise<void>; /** * Pulls a folder from the remote device. * * @param remotePath The full path to the remote folder. * @returns Promise that resolves to the folder content as a base64-encoded zip file string. */ export declare function pullFolder(this: AndroidDriver, remotePath: string): Promise<string>; /** * Deletes a file from the remote device. * * @param remotePath The full path to the remote file or a file inside an application bundle * (for example `@my.app.id/path/in/bundle`). * @returns Promise that resolves to `true` if the file was successfully deleted, `false` if it doesn't exist. * @throws {errors.InvalidArgumentError} If the remote path points to a folder instead of a file. */ export declare function mobileDeleteFile(this: AndroidDriver, remotePath: string): Promise<boolean>; //# sourceMappingURL=file-actions.d.ts.map