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
public interface HasClipboard extends ExecutesMethod, CanRememberExtensionPresence
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default java.lang.String
getClipboard(ClipboardContentType contentType)
Get the content of the clipboard.default java.lang.String
getClipboardText()
Get the clipboard text.default void
setClipboard(ClipboardContentType contentType, byte[] base64Content)
Set the content of device's clipboard.default void
setClipboardText(java.lang.String text)
Set the clipboard text.-
Methods inherited from interface io.appium.java_client.CanRememberExtensionPresence
assertExtensionExists, markExtensionAbsence
-
Methods inherited from interface io.appium.java_client.ExecutesMethod
execute, execute
-
-
-
-
Method Detail
-
setClipboard
default void setClipboard(ClipboardContentType contentType, byte[] base64Content)
Set the content of device's clipboard.- Parameters:
contentType
- one of supported content types.base64Content
- base64-encoded content to be set.
-
getClipboard
default java.lang.String getClipboard(ClipboardContentType contentType)
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
default void setClipboardText(java.lang.String text)
Set the clipboard text.- Parameters:
text
- The actual text to be set.
-
getClipboardText
default java.lang.String getClipboardText()
Get the clipboard text.- Returns:
- Either the text, which is stored in the clipboard or an empty string if the clipboard is empty
-
-