The Clipboard action allows you to:
- Read text from the Clipboard into a variable in ScenarioBuilder
- Write text to the Clipboard from a variable in ScenarioBuilder
Note: The clipboard action only lets you to read/write text from/into the system clipboard using a ScenarioBuilder variable. This action cannot be used to process files.
The action can be found in the Actions list under "Control Actions". Click on the arrow to expand the section or double-click Control Actions.
- Read/Write - select Read or Write from the drop down to read from or write to the system clipboard.
- Variable Name - provide a name for the variable you want to read/write to/from.
- Reset Clipboard - select if you want to clear the clipboard value.
- Continue On Failure - if selected, the execution of the scenario will continue even if there is a failure.
- Scenario Section - this is for Global Scenarios only. Specify the section name that can be called from other scenarios.
Write to Clipboard
To write a value to the clipboard:
- Use "Set a Variable" action to provide a value.
- Add a Clipboard action to write the value of the variable to the clipboard.
In this example, we have set a variable named "variable_x" with a value of "test". The clipboard action will write the value of "test" to the clipboard.
Read from Clipboard
To read a value from the clipboard:
- Use the "Clipboard Action" to read the value in the clipboard to a variable.
- Use a "Type Text" action to call on the value.
In this example, the Clipboard Action will read the value from the clipboard into a variable named "y". The "Type Text" action will type the value of "y" into the notepad document.