|
Post by leiwang on Aug 5, 2020 7:25:21 GMT
1. Open the dialog for enabling test environment 2. Select the "Java Environments" to add JRE for enabling 3. Add "c:\SAFS\jre"
|
|
|
Post by leiwang on Aug 5, 2020 7:26:18 GMT
4. Click the "Enable" button to enable the SAFS jre 5. After enabling, we can see RFT add a jar file rational_ft_bootstrap.jar into folder c:\SAFS\jre\lib\ext
|
|
|
Post by leiwang on Aug 5, 2020 7:33:57 GMT
Once the Java environment is enabled, we can start a Java application for testing. We take our sample java application for example: 1. Go to the C:\SAFS\samples\JavaApp folder, then run C:\SAFS\jre\bin\java -jar swingapp.jar2. Open RFT Object Inspector and move the mouse on that java application, RFT can recognize it as Java application.
|
|
|
Post by leiwang on Aug 5, 2020 8:24:51 GMT
Then we can use "STAF Process Container" to recognize this Java application and generate recognition-strings. 1. Run C:\SAFS\Project\runSTAFProcessContainer.bat as Administrator , the "STAF Process Container" should be ready. a. We choose the "Java Client" for "Enabled Domains". b. We input the recognition-string Type=Window;Caption={Swing*} for Window Recognition and Object Recognition c. We click the button "Click to Run" 2. The "STAF Process Container" should be processing, once it is done, we should get the "Component Hierarchy Viewer" and it contains the tree representing each component of that Java application. If we click on a tree node, the recognition-string will be shown below; If we click the button "Highlight", the "STAF Process Container" will highlight the java component with a red rectangle. 3. If we open the map file C:\SAFS\Project\DatapoolAppMap.map, we should see the recognition-strings are already there, something as below: [MainWindow] MainWindow="Type=Window;Caption={Swing*}" RootPane="Type=JavaWindow;Index=1;\;Type=RootPane;Index=1" JavaPanel="Type=JavaWindow;Index=1;\;Type=RootPane;Index=1;\;Type=JavaPanel;Index=1" JavaPanel2="Type=JavaWindow;Index=1;\;Type=RootPane;Index=1;\;Type=JavaPanel;Index=1;\;Type=JavaPanel;Index=2" swingappSwingAppToolBar="Type=JavaWindow;Index=1;\;Type=RootPane;Index=1;\;Type=JavaPanel;Index=1;\;Type=JavaPanel;Index=2;\;Class=swingapp.SwingAppToolBar;ClassIndex=1"
|
|