Inserting clipboard commands into a functional test script
During recording or editing,
you can insert system clipboard commands into a functional test script.
You can also insert into a functional test script a verification point
test command against the active content in the system clipboard.
About this task
Procedure
- If recording, click the Insert Script Support
Commands button
on the Recording Monitor toolbar. - If editing:
- Position the pointer in the script where you want to insert the comment.
- On the functional testing toolbar, click the Insert
Recording into Active Functional Test Script button
. - On the Recording Monitor toolbar, click the Insert
Script Support Commands button
.
- In the Script Support Functions dialog box, click the Clipboard tab.
- To insert the clipboard verification point test command
into the script, select the Verification Point tab
and perform the following:
- Type the verification point name in the VP Name field.
- Click the
Convert
Value to Regular Expression button to convert the system
clipboard value to a regular expression pattern. This
is matched at run time against the system clipboard contents. - 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. To try
an expression, change the value in the Pattern field
and click the Evaluate button. The Result indicates
whether the expression matched. Click OK. - Click the Insert Code button to insert the clipboard verification point command into the functional test script.
- You can also have clipboard text automatically pasted into
an input field during test runs. To assign the clipboard text to a
script variable, perform the following: and perform the following:
- Select the Assign Text tab
- Type the script Variable Name to which you want to assign the clipboard text.
- Select the Precede variable assignment with type declaration check box to precede the variable name with a string type declaration.
- Click the Insert Code button to insert in the functional test script the command for assigning the clipboard content into a local variable.
- To update the contents of the system clipboard, select
the Set Text tab and perform the following
steps:
- In the Set clipboard text to the following value field, type the value for the clipboard.
- Click the Insert Code button to insert into a functional test script the command for setting the content of the clipboard to the supplied value.
Related tasks:
Related reference: