1. What does RFSM mean?
RFSM means RFT Find Search Mode . RFSM is a name of the search algorithm. It uses RFT API to find AUT’s objects.
2. How can I use RFSM algorithm?
Just add :RFSM: prefix at beginning of the recognition string.
Example: :RFSM: .domain=Java;.class=com.sas.test
Using above, user can run any search mode simultaneously with FPSM or/and MCSM.
Or
Turn on exclusively RFMS mode by adding RFSMOnly=true flag into the tidtest.ini file of the automation project. Once you turn on the flag then the recognition string doesn’t require : RFSM: prefix.
Example: .domain=Java;.class=com.sas.test
Using above, Only RFSM runs exclusively.
3. Can I use RFSM mode with others mode such as MCSM, FPSM or both?
Yes, Add :RFSM: prefix to the recognition string. SAFS engine will process prefix tag appropriately.
User also can keep Main window string FPSM or MCSM mode and child recognition string FSMS mode. Any combination works.
Example: User can define appmap following way
[SASHelp]
SASHelp=”Type=Window;Caption={^T.SASHelp.Caption}”
ButtonPrint= “:RFSM:.class=javax.swing.JButton;.text=Print”
4. Does RFSM support regular expression to find dynamic object window?
Yes, RFSM supports regular expression and follow java’s regular expression rules. Regular Expression syntax will specify into / regular expression / block.
Examples: if regular expression is ^SAS Management Console or Server$ or gv\d+
a. :RFSM:.domain=Java;class=com.sas.comsole.managment;title=/^SAS Management Console/
b. :RFSM:.domain=Java;class=com.sas.comsole.managment;title={^T.ServerName}, where T.ServerName= /Server$/
c. :RFSM:.domain=Java;class=com.sas.comsole.managment;.id=/gv\d+/
5. Does recognition string have any reserved words for the syntax?
Yes, “;” ";\;" and “=” are reserves for recognition strings. Don’t use them as part of regular expression or object property value. If it required as object property value, then make regular expression to substitute.
Example:
Wrong recognition string example
a. :RFSM:.domain=Java;class=com.sas.comsole.managment;title=SAS Management Console;My profile
b. :RFSM:.domain=Java;class=com.sas.comsole.managment;title=/temp=[a-z]\d+/
Correct recognition string example
c. :RFSM:.domain=Java;class=com.sas.comsole.managment;title=/SAS Management Console$/
d. :RFSM:.domain=Java;class=com.sas.comsole.managment;title=/temp.[a-z]\d+/
6. How can I capture recognition string for the RFSM?
Use RFT’s Test Object Inspector (Run->Test Object Inspector…) utility to find AUT object’s property. There are many property starts with “.” prefix, keep them as they are display.
7. How can I find dynamic property change objects which are inserted into table’s row? Or regular expression finds more objects while user would like to process as objects order display into the Application Under Test.
Yes, there is a way the RFSM gives the object back as user pass selection through by recognition string.
Example:
:RFSM:.domain=Html;class=Html.IMG;.id=/gv\d+/;Index=1
Above case, Index is not an object recognition property. But if above regular expression finds more than one HTML Images by id=gvxxxx, Index helps user to select/get first object among all.
8. How can I improve the performance? Or RFSM is taking long time to find first/main window?
User can do following steps to improve performance quickly
a.
Remove unnecessary domains. Open RFT’s IDE, Configure->Enable Environments->Java Environment. Remove/Disable all Java except IBM Rational SDP and the AUT’s (Application Under Test) JRE/JDK.
b.
User should pass “.domain=Java or Html or Flex” on main window recognition string to speed up finding process.
Example:
a. :RFSM:.domain=Java;class=com.sas.comsole.managment;title=/temp.[a-z]\d+/
b. :RFSM:.domain=Html;.class=Html.HtmlBrowser
It is recommended to add “.domain=Flex or Java or Html” for each new window into the appmap, so new window find narrow down to the specific domain.
Example:
[WRSWindow]
WRSWindow=":RFSM:.domain=Html;.class=Html.HtmlBrowser"
FileButton=":RFSM:.class=Html.BUTTON;.id=citationFileButton"
[FlexWindow]
FlexWindow=":RFSM:.domain=Flex;className=RunTimeLoaderFlex30.class=FlexApplication;automationClassName=FlexApplication"
MenuBar=":RFSM:.class=FlexMenuBar;className=mx.controls.MenuBar;id=menuBar;automationClassName=FlexMenuBar"
c.
User should consider adding additional hierarchy (parent;\;child) information into the recognition string to guide the search algorithm down the right path. Notice the use of ';\;' to separate parent\child hierarchy.
Example:
[WRSWindow]
WRSWindow=":RFSM:.domain=Html;.class=Html.HtmlBrowser"
DeepButton=":RFSM:.class=Html.HtmlDocument;.title=topDoc;\;.class=Html.HtmlFrame;.id=contentPane;\;.class=Html.HtmlDocument;.title=buttonPane;\;.class=Html.HtmlButton;.id=myButton"
9. Do we have any timeout value for RFSM ?
No, there is not any timeout value for the RFSM, if object doesn’t find then RFSM will return null object. However, SAFS have some setting about window and their component, and they are in tidtest.ini file. User can set “SECSWaitForComponent=5” and “SECSWaitForWindow=5” value to retry RFSM finding object until reach the value those values.
10. Sometime I get null object or object can’t be find, even though the RFT object inspector can view them?
Check your regular expression string or object’s property. Make sure about property start with “.” Prefix. If regular expression finds more object then RFSM select first one. User can record a script and see the object property match or contact SAFS dev team.
11. How can I capture RFSM recognition string?
You can capture RFSM recognition string by two way, they are following
a. RFT’s Test Object Inspector
Start RFT, Run-> Test Object Inspector or see for spy glasses with red arrow. It will bring Test Object Inspector GUI, move your mouse to the AUT objects/component (Button etc…), object property will be display into Test Object Inspector.

The HTML Tab recognition string would be “:RFSM:.id=tablink2;.text=By Industry”. Normally, two unique properties are enough.
b. Find object by recording script for RFT.
Open RFT, create a project and an empty script. Insert recording by Script-> Insert Recording, the recording will start and click on object to record. Once you record the object then click hit for stop. The new object will insert into RFT object map and it will display on RFT right side Script Explorer view.

Double click on link_tablink2 for the property info.

The recognition string would be “:RFSM:.id=tablink2;.text=By Industry
User can use any one above method to capture recognition RFSM string; there is no difference, but different ways