Created By  inflectra.sarahx Thursday, December 12, 2013
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 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.

Article Info
  • Last Updated: 12/12/2013
  • Article ID: KB68
  • Views: 2311