Sometimes when automating a test, you need to access the local Windows clipboard. This article describes how to access the Windows clipboard programmatically.
There are a couple special libraries that contains useful things. These include: g_util and g_helper. It just happens that the g_util library has a method to get the existing clipboard contents:
var myText = g_util.GetClipboardText();
To copy value from Rapise to clipboard use
To see some of the other useful methods, one can add the g_util or g_helper string to their code window followed by a period (.) and a list of all the methods should pop open.
NOTE: If the script has not yet been saved, this “auto-list” functionality will not be available until the user saves, closes and reopens the script.
To use clipboard in RVL put these functions into *.user.js file.
function CopyToClipboard(/**string*/ value)
The following snippet puts a value into clipboard, then reads it and prints to the report.
Selected files will be attached to any email sent on saving ticket.
Select files to upload
Or drag and drop files here
Save to upload the selected file(s)