Python API

Clipboard

class RPA.Desktop.Clipboard.Clipboard

DEPRECATED!! Use library RPA.Desktop’s clipboard functionality instead.

Clipboard is a library for managing clipboard - copy text to, paste text from, and clear clipboard contents.

Examples

Robot Framework

*** Settings ***
Library    RPA.Desktop.Clipboard

*** Tasks ***
Clipping
    Copy To Clipboard   Text from Robot to clipboard
    ${var}=             Paste From Clipboard
    Clear Clipboard

Python

from RPA.Desktop.Clipboard import Clipboard

clip = Clipboard()
clip.copy_to_clipboard('Text from Python to clipboard')
text = clip.paste_from_clipboard()
print(f"clipboard had text: '{text}'")
clip.clear_clipboard()
ROBOT_LIBRARY_DOC_FORMAT = 'REST'
ROBOT_LIBRARY_SCOPE = 'GLOBAL'
clear_clipboard()

DEPRECATED!! Use RPA.Desktop library’s Clear Clipboard instead. Clear clipboard contents

copy_to_clipboard(text)

DEPRECATED!! Use RPA.Desktop library’s Copy to Clipboard instead.

Copy text to clipboard

Parameters

text – to copy

paste_from_clipboard()

DEPRECATED!! Use RPA.Desktop library’s Paste from Clipboard instead.

Returns

text