Testing the flex proxy sample

With this proxy sample you learn how to write a simple proxy, map proxies to controls (handled internally), deploy proxies, and verify that the proxies work.

To test the sample, complete these procedures:
  1. Open the application file mypage.htm located at <installation_folder>\SDP\FunctionalTester\Flex\flexcustomcontrolapp.zip after unzipping it.
  2. Add the sample application path to the trusted directory C:\WINDOWS\system32\Macromed\Flash\FlashPlayerTrust\ by creating a file without an extension. For example, create a file named Flex in the trusted directory and add the file path of the sample application C:\Program Files\IBM\SDP\FunctionalTester\Flex\flexcustomcontrolapp\mypage.htm to it.
  3. Copy the contents of the ClassInfo tag in C:\Program Files\IBM\SDP\FunctionalTester\Flex\flexcustomcontrolapp\FlexCustom.xml file into <installation_folder>\bin\FlexEnv.xml file.
  4. Invoke the sample Flex application and try recording on it.

Deploy the binary files

Deploy the FlexCustomControl.jar and FlexCustomControl.rftcust files to the customization directory. For example, C:\ProgramData\IBM\RFT\customization . Close Rational® Functional Tester, all Java enabled applications and browsers so that the new customization class is loaded. Restart Rational® Functional Tester to test the sample application under test.

Verify the proxy deployment

You can test the controls that are provided as part of the FlexCustomControlApp application under test by verifying the proxy class name before and after deployment.
  • Before you deploy the proxies, notice that the Proxy Class Name (#proxy) property under Administrative properties for FlexCustomControl is .flex.FlexObjectProxy . This is the default value for this control. Before you deploy the proxies, notice that the event method is captured as follows:
    flex_FlexCustomControl().performAction("Select","Food");
  • After you deploy the proxies, sdk.sample.flex.FlexCustomControlProxy is the newly developed proxy for the FlexCustomControl control. After you deploy the proxies notice also that the event method is captured as follows:
    Select("Food");