RRAFS ProcessContainer, RunProcessContainer Script, STAF ProcessContainer, Supported Enhancements, Object Map Alternative
This document is an RFT-specific supplement to the primary and critical CreateAppMaps document.
Please make yourself familiar with the concepts in that document before proceeding here.
However, it is important to note that we can use named components stored in RFT's Object Maps instead of using recognition strings. Consult the section on RFT Object Map Alternative for more info.
Top, RRAFS ProcessContainer, STAF ProcessContainer, Supported Enhancements, Object Map Alternative
The tester enables or disables a Domain in the short script by commenting or uncommenting out the domain names to be processed. Other Process Container features are enabled or disabled by setting their values to 'true' or 'false'. When the tester runs this script it will process all found windows and output component hierarchies, properties, and recognition information based on the features enabled or disabled by the tester.
Top, RRAFS ProcessContainer, RunProcessContainer Script, Supported Enhancements, Object Map Alternative
There is a full-featured STAF Process Container including a RRAFS-like UI written with Java. This new "Driver" actually takes advantage of the new Engine Component Commands, and we have written an implementation for these Engine commands in RFT.
This is launched in the same way the SAFS TID or SAFSDRIVER is launched--generally through a BAT file. It reads the runtime configuration from one or more INI files (SAFSTID.INI files) the same as SAFSDRIVER. In reality, it is a test development-time driver instead of a test runtime driver like SAFSDRIVER. There should be working TIDTest samples of these BAT and INI files installed at C:\SAFS\Project or wherever SAFS was installed.
Consult the STAF Process Container documentation and the Configuration File documentation for more info on config file settings. Below is a sample subset of the INI settings for running STAF Process Container with RFT:
[SAFS_DRIVER] DriverRoot="C:\safs" [SAFS_PROJECT] ProjectRoot="C:\safsproject" [SAFS_ENGINES] First=org.safs.tools.engines.SAFSROBOTJ [SAFS_ROBOTJ] AUTOLAUNCH=TRUE DATASTORE="C:\SAFS\DatastoreJ"
Top, RRAFS ProcessContainer, RunProcessContainer Script, STAF ProcessContainer, Object Map Alternative
RFT and other engines generally add two new qualifiers we can use in recognition strings:
Examples:
For more information on recognition strings in RFT consult the reference on Gui Object Recognition.
Top, RRAFS ProcessContainer, RunProcessContainer Script, STAF ProcessContainer, Supported Enhancements
Our RFT search algorithm does allow us to reference objects stored in any RFT Object Map to which TestScript has access. This is especially useful if you have or intend to use custom RFT scripts which will require these Object Map references anyway.
Object references are sought in RFT Object Maps before we start the search algorithm. So using an RFT Object Map object will almost always be quicker than using recognition strings and the search algorithm.
We can use RFT Object Map object names directly in Test records:
T MyMainWin OKButton Click
In the above case one or both of 'MyMainWin' and 'OKButton' are the names of objects stored in RFT's Object Maps available to TestScript. Using the names directly like this is possible, but not really recommended. If the names of Object Map items are changed for any reason then all the test records in all test tables using those names must be edited to use the new names.
Instead, we can provide a level of abstraction or decoupling by using SAFS App Map object names to reference RFT Object Map objects. Below is a sample App Map referencing the same RFT Object Map objects:
[MainWin] MainWin="MyMainWin" OK="OKButton"
Then we use the App Map names in our Test records as usual:
T MainWin OK Click
In the above case SAFS will lookup the value of 'MainWin' and 'OK' in the App Map and then use the retrieved values of 'MyMainWin' and 'OKButton' to retrieve references to the RFT Object Map objects with those names. This decoupling protects the test tables and records from changes to Object Map object names. If the name of an object in the RFT Object Map changes there is only one place to fix it--in the SAFS App Map. The test records and tables remain unaffected.
It is important to note that referencing RFT Object Map objects by either of these mechanisms means the object MUST exist in the Object Map. If it does not exist then we cannot successfully use the search mechanism because we have no recognition string information to use in the search.
Details and instructions for creating an RFT Object Map for the RFT TestScript Hook can be found in Using RFT Object Maps