UNPKG

appium-xcuitest-driver

Version:

Appium driver for iOS using XCUITest for backend

31 lines 1.11 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.setClipboard = setClipboard; exports.getClipboard = getClipboard; /** * Sets the primary clipboard's content on the device under test. * * @param content - The content to be set as base64 encoded string. * @param contentType - The type of the content to set. * Only `plaintext`, 'image' and 'url' are supported. */ async function setClipboard(content, contentType) { await this.proxyCommand('/wda/setPasteboard', 'POST', { content, contentType, }); } /** * Gets the content of the primary clipboard on the device under test. * * @param contentType - The type of the content to get. * Only `plaintext`, 'image' and 'url' are supported. * @returns The actual clipboard content encoded into base64 string. * An empty string is returned if the clipboard contains no data. */ async function getClipboard(contentType) { return await this.proxyCommand('/wda/getPasteboard', 'POST', { contentType, }); } //# sourceMappingURL=clipboard.js.map