Functional testing samples for the Visual Studio IDE
Rational® Functional Tester ships with some example code you can use in your own scripts. You can open these examples from within the sample project shipped with Rational® Functional Tester. The sample project was created using the Rational® Functional Tester tutorial. For reference, you can look at the script and other test assets while you do the tutorial, or after you complete the tutorial, if you want to compare the script and test assets to your files or actually play back the script.
The sample project contains the script, verification points, object map, and other files that are created when you complete the tutorial. The sample script is in the state it would be in at the end of the tutorial. The tutorial script is named "ClassicsSample."
Opening the sample project
To open the examples in the sample project, click Run Functional Test Script button on the product toolbar.
, browse to C:\Program Files\IBM\SDP\FunctionalTester\vsnet\FTSampleProject, and open FTSampleProject.rftvs. The project displays in the Solution Explorer. Double-click on the script name in the Solution Explorer to display the script in the Code Editor window. To play back the script, click theExamples
The project contains example code you can use in your own scripts.
Class | Package | Description |
ExtensionScript | superscript | Provides several general utility methods. |
HtmlScript | superscript | Provides a handler to automatically dismiss unexpected active HTML dialog boxes. |
Using the examples
If you want to use the examples, copy the superscript directories and their contents into a Functional Test project.
To use one of the superscripts:
-
Set the helper base class property for a script to the full class name of the superscript. For example, to use the ExtensionScript base class for a script called X, right-click on X in the Solution Explorer, and click Properties.
-
In the X Property Pages dialog box, select Functional Test Script in the list on the left.
-
In the Helper base class field, type superscript.ExtensionScript.
-
Click OK.
You can modify your project preferences to extend the ExtensionScript superscript for all new scripts in the project. To do so, you must define a default helper base class for a project.
To modify project preferences:
-
Right-click on the project and click Properties.
-
In the Rational® Functional Tester Project field, type New Script Helper base class.
-
Click OK.
Now your X script can make use of the additional methods of ExtensionScript such as GetClipboardText(), SetClipboardText(), and ClipboardVP().