0


Appium-Get Clipboard(获取剪贴板)

Get Clipboard

Get the content of the system clipboard //获取剪切板内容

Example Usage

Javadriver.getClipboard(ClipboardContentType.PLAINTEXT); // get plaintext
driver.getClipboardText();Pythonself.driver.get_clipboard()
self.driver.get_clipboard_text()Javascript// webdriver.io example
driver.getClipboard();
// wd example
await driver.getClipboard();Ruby# ruby_lib example
get_clipboard

ruby_lib_core example

@driver.get_clipboardC#// CSharp Code herePHP// PHP Code here

Description

Get the content of the system clipboard

(For iOS real devices) Apple security preferences require the WebDriverAgentRunner application to be in foreground in order to be able to receive the system clipboard content. Otherwise an empty string is always returned. Consider using Activate App and Background App to change the foreground application. //获取系统剪贴板内容,对于iOS real设备)Apple安全首选项要求WebDriverAgentRunner应用程序位于前台,以便能够接收系统剪贴板内容。否则将始终返回空字符串。考虑使用激活应用程序和后台应用程序来更改前台应用程序

Support
Appium Server

详见

Appium Clients

详见

HTTP API Specifications
Endpoint
POST /session/:session_id/appium/device/get_clipboard
URL Parameters

namedescriptioncontentTypeID of the session to route the command to

JSON Parameters

nametypedescriptionlanguage

string

The type of the content to get. Plaintext, Image, URL. Android supports only plaintext.

Response

Clipboard content as base64-encoded string or an empty string if the clipboard is empty (

string

) //剪切板内容base64编码字符串或者空字符串

标签: 字符串 安全 java

本文转载自: https://blog.csdn.net/weixin_45576146/article/details/115612713
版权归原作者 Aniona 所有, 如有侵权,请联系我们删除。

“Appium-Get Clipboard(获取剪贴板)”的评论:

还没有评论