UNPKG

appium-espresso-driver

Version:
25 lines 991 B
/** * Gets the clipboard content from the device. * @returns Promise that resolves to base64-encoded content of the clipboard * or an empty string if the clipboard is empty. */ export async function getClipboard() { return (await this.adb.getApiLevel()) < 29 ? (await this.espresso.jwproxy.command('/appium/device/get_clipboard', 'POST', {})) : await this.settingsApp.getClipboard(); } /** * Sets the clipboard content on the device. * @param content - Base64-encoded clipboard payload * @param contentType - Only a single content type is supported, which is 'plaintext' * @param label - Optional label to identify the current clipboard payload * @returns Promise that resolves when the clipboard is set */ export async function mobileSetClipboard(content, contentType, label) { await this.espresso.jwproxy.command('/appium/device/set_clipboard', 'POST', { content, contentType, label, }); } //# sourceMappingURL=clipboard.js.map