appium-xcuitest-driver
Version:
Appium driver for iOS using XCUITest for backend
79 lines • 4.07 kB
TypeScript
import type { XCUITestDriver } from '../driver';
import type { ContainerObject, ContainerRootSupplier } from './types';
/**
* Parses the actual path and the bundle identifier from the given path string.
*
* @param remotePath - Path string matching `CONTAINER_PATH_PATTERN`, e.g. `@bundle.id:container/relative/path`
* @param containerRootSupplier - Container root path supplier or explicit root
*/
export declare function parseContainerPath(this: XCUITestDriver, remotePath: string, containerRootSupplier?: ContainerRootSupplier | string): Promise<ContainerObject>;
/**
* Pushes the given data to a file on the remote device.
*
* @param remotePath The full path to the remote file or
* a file inside a package bundle. Check the documentation on
* `pushFileToRealDevice` and `pushFileToSimulator` for more information
* on acceptable values.
* @param base64Data Base64 encoded data to be written to the
* remote file. The remote file will be silently overridden if it already exists.
* @throws {Error} If there was an error while pushing the data
*/
export declare function pushFile(this: XCUITestDriver, remotePath: string, base64Data: string | number[] | Buffer): Promise<void>;
/**
* Pushes the given data to a file on the remote device.
*
* @param remotePath - The full path to the remote file
* or a specially formatted path, which points to an item inside an app bundle.
* @param payload - Base64-encoded content of the file to be pushed.
*/
export declare function mobilePushFile(this: XCUITestDriver, remotePath: string, payload: string): Promise<void>;
/**
* Pulls a remote file from the device.
*
* @param remotePath The full path to the remote file
* or a specially formatted path, which points to an item inside app bundle.
* See the documentation for `pullFromRealDevice` and `pullFromSimulator`
* to get more information on acceptable values.
* @returns Base64 encoded content of the pulled file
* @throws {Error} If the pull operation failed
*/
export declare function pullFile(this: XCUITestDriver, remotePath: string): Promise<string>;
/**
* Pulls a remote file from the device.
*
* @param remotePath - The full path to the remote file
* or a specially formatted path, which points to an item inside app bundle. See the documentation for `pullFromRealDevice` and `pullFromSimulator` to get more information on acceptable values.
* @returns The same as in `pullFile`
*/
export declare function mobilePullFile(this: XCUITestDriver, remotePath: string): Promise<string>;
/**
* Delete a remote folder from the device.
*
* @param remotePath - The full path to the remote folder or a specially formatted path, which points to an item inside app bundle. See the documentation for `pullFromRealDevice` and `pullFromSimulator` to get more information on acceptable values.
* @returns Nothing
*/
export declare function mobileDeleteFolder(this: XCUITestDriver, remotePath: string): Promise<void>;
/**
* Delete a remote file from the device.
*
* @param remotePath - The full path to the remote file or a specially formatted path, which points to an item inside app bundle. See the documentation for `pullFromRealDevice` and `pullFromSimulator` to get more information on acceptable values.
* @returns Nothing
*/
export declare function mobileDeleteFile(this: XCUITestDriver, remotePath: string): Promise<void>;
/**
* Pulls the whole folder from the remote device
*
* @param remotePath The full path to a folder on the
* remote device or a folder inside an application bundle
* @returns Zipped and base64-encoded content of the folder
* @throws {Error} If there was a failure while getting the folder content
*/
export declare function pullFolder(this: XCUITestDriver, remotePath: string): Promise<string>;
/**
* Pulls the whole folder from the device under test.
*
* @param remotePath - The full path to the remote folder
* @returns The same as `pullFolder`
*/
export declare function mobilePullFolder(this: XCUITestDriver, remotePath: string): Promise<string>;
//# sourceMappingURL=file-movement.d.ts.map