UNPKG

appium-xcuitest-driver

Version:

Appium driver for iOS using XCUITest for backend

75 lines 3 kB
/** * Retrieve a file from a real device * * @param {any} afcService Apple File Client service instance from * 'appium-ios-device' module * @param {string} remotePath Relative path to the file on the device * @returns {Promise<Buffer>} The file content as a buffer */ export function pullFile(afcService: any, remotePath: string): Promise<Buffer>; /** * Retrieve a folder from a real device * * @param {any} afcService Apple File Client service instance from * 'appium-ios-device' module * @param {string} remoteRootPath Relative path to the folder on the device * @returns {Promise<Buffer>} The folder content as a zipped base64-encoded buffer */ export function pullFolder(afcService: any, remoteRootPath: string): Promise<Buffer>; /** * @typedef {Object} PushFileOptions * @property {number} [timeoutMs=240000] The maximum count of milliceconds to wait until * file push is completed. Cannot be lower than 60000ms */ /** * Pushes a file to a real device * * @param {any} afcService afcService Apple File Client service instance from * 'appium-ios-device' module * @param {string|Buffer} localPathOrPayload Either full path to the source file * or a buffer payload to be written into the remote destination * @param {string} remotePath Relative path to the file on the device. The remote * folder structure is created automatically if necessary. * @param {PushFileOptions} [opts={}] */ export function pushFile(afcService: any, localPathOrPayload: string | Buffer, remotePath: string, opts?: PushFileOptions): Promise<void>; /** * @typedef {Object} PushFolderOptions * * @property {number} [timeoutMs=240000] The maximum timeout to wait until a * single file is copied * @property {boolean} [enableParallelPush=false] Whether to push files in parallel. * This usually gives better performance, but might sometimes be less stable. */ /** * Pushes a folder to a real device * * @param {any} afcService Apple File Client service instance from * 'appium-ios-device' module * @param {string} srcRootPath The full path to the source folder * @param {string} dstRootPath The relative path to the destination folder. The folder * will be deleted if already exists. * @param {PushFolderOptions} opts */ export function pushFolder(afcService: any, srcRootPath: string, dstRootPath: string, opts?: PushFolderOptions): Promise<void>; export const IO_TIMEOUT_MS: number; export type PushFileOptions = { /** * The maximum count of milliceconds to wait until * file push is completed. Cannot be lower than 60000ms */ timeoutMs?: number | undefined; }; export type PushFolderOptions = { /** * The maximum timeout to wait until a * single file is copied */ timeoutMs?: number | undefined; /** * Whether to push files in parallel. * This usually gives better performance, but might sometimes be less stable. */ enableParallelPush?: boolean | undefined; }; //# sourceMappingURL=ios-fs-helpers.d.ts.map