Package io.appium.java_client.clipboard
Interface HasClipboard
- All Superinterfaces:
CanRememberExtensionPresence,ExecutesMethod
- All Known Subinterfaces:
HasAndroidClipboard,HasIOSClipboard
- All Known Implementing Classes:
AndroidDriver,FlutterAndroidDriver,FlutterIOSDriver,IOSDriver
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringgetClipboard(ClipboardContentType contentType) Get the content of the clipboard.default StringGet the clipboard text.default voidsetClipboard(ClipboardContentType contentType, byte[] base64Content) Set the content of device's clipboard.default voidsetClipboardText(String text) Set the clipboard text.Methods inherited from interface io.appium.java_client.CanRememberExtensionPresence
assertExtensionExists, markExtensionAbsenceMethods inherited from interface io.appium.java_client.ExecutesMethod
execute, execute
-
Method Details
-
setClipboard
Set the content of device's clipboard.- Parameters:
contentType- one of supported content types.base64Content- base64-encoded content to be set.
-
getClipboard
Get the content of the clipboard.- Parameters:
contentType- one of supported content types.- Returns:
- the actual content of the clipboard as base64-encoded string or an empty string if the clipboard is empty
-
setClipboardText
Set the clipboard text.- Parameters:
text- The actual text to be set.
-
getClipboardText
Get the clipboard text.- Returns:
- Either the text, which is stored in the clipboard or an empty string if the clipboard is empty
-