to “Software Testing Genius”.
Subscribe to my
RSS feedforlatest content on Software
Tutorial-10 How to Insert clipboard commands into RFT Scripts
We can insert system clipboard commands into a RFT script during recording or editing. In addition to this we can insert a verification point test command into a RFT script, against the active content in the system clipboard.
Steps to Insert clipboard commands into a script
during recording or editing are as under:
Step – 1:
Inserting script support commands:
color=#800000 size=2>a) During Recording: Click the "Insert Script Support Commands" button on the Recording Monitor toolbar.
b) During Editing:
It is a three-step process:
1) Position the pointer in the script where we want to insert the comment.
2) Click the "
Insert Recording into Active Functional Test Script" button on the Functional Tester toolbar.
3) Click the "
Insert Script Support Commands" button on the Recording Monitor toolbar. Step – 2: Click the "Clipboard" tab, In the "Script Support Functions" dialog box.
Step – 3:
Inserting the clipboard verification point test command into the script:
a) Select the "Verification Point tab".
b) Key in the verification point name in the "VP Name" field.
c) Click the "Convert Value to Regular Expression" button to convert the system clipboard value to a regular expression pattern. This value shall be matched at runtime against the system clipboard contents.
d) Click the "Evaluate Regular Expression" button to evaluate the current pattern against the system clipboard contents. In the Evaluate Regular Expression dialog box, the "Pattern" and "Match Against Value" fields contain the current value.
e) To try an expression, change the value in the Pattern field and click the "Evaluate" button. The "Result" indicates whether the expression matched.
f) Click "OK".
g)Click the "Insert Code" button to insert the clipboard verification point command into the RFT script. Step – 4:Assigning the clipboard text to a script variable:
a) select the "Assign Text" tab.
b) Enter the script "Variable Name" to assign the clipboard text.
c) Place a check mark on the check box "Precede variable assignment with type declaration" to precede the variable name with a String type declaration.
d) Click the "Insert Code" button to insert the command for assigning the clipboard content into a local variable in a functional test script. Step – 5:Updating the contents of the system clipboard:
a) Select the "Set Text" tab.
b) Enter the value for the clipboard, In the "Set clipboard text to the following value" field.
c) Click the "Insert Code" button to insert the command into the RFT script for setting the content of the clipboard to the supplied value. Many More Tutorials on IBM RFT