RFT provides the Application Configuration Tool that can be used to configure a list of applications to be launched by RFT using the startApp() Api.
would launch the ClassicsJavaA application which is pre-configured in the App Config Tool.
Following image shows the Application Configuration Tool.
You can configure different types of applications in this wizard and let the RFT start those applications during playback by using startApp(<Appliation's Symbolic Name>)
To be able start lets say Add Remove Programs Wizard in the control panel (for Windows based OS), from the RFT script , we can configure the application (i.e Add/Remove Wizard) as follows:
- Launch the App Config Wizard.
[In RFT IDE go to Configure -> Configure Application For Testing]
- Click the "Add.." button to add a new application.
- On the next page titled "Add application" select the type of application as "Executable or Batch File" , and click Next
- On the next page click on the 'Browse' button to browse to the System32 folder and select the the executable Control.exe
[Or Instead of using the Browse button , in the File text box just type the path to the control.exe , on my Win7 machine it's C:\Windows\System32\Control.exe]
- Click Finish , to get back to the Application Configuration Tool.
- Control.exe execuable just launches the windows Contol Panel by default . , so to make it launch the Add/Remove Programs Wizard we need to pass it "appwiz.cpl" as the argument.
This is done by providing appwiz.cpl in the "Args"
field of the Application Configuration Tool, a shown below.
- That's all , now you can launch the Add /Remove Programs by calling startApp("AddRemovePrograms"); in the script.
Following the same steps you can add other applications also and provide arguments as needed. Apart from startApp() ,
Another API that can be used is startBrowser() that can be used to lauch the browser and it takes an optional String argument which is the url to be launched ,
startBrowser("http://www.ibm.com"); // This will launch the specified url with the default browser.
startBrowser("Firefox","http://www.ibm.com");//This will launch the specified URL using the Firefox browser, Note that Firefox has been configured in the Enable Environment For Testing Tool