This proxy sample explains how to write a simple proxy, map proxies
to controls, deploy proxies, and verify how proxies work.
Extended Capabilities : Changing the TestObject descriptive
name
This proxy sample extends the proxy method public String
getDescriptiveName() to change the TestObject descriptive names for
the java.awt.Button and javx.swt.JButton controls.
Deploy the binary files
Copy the ButtonProxy.jar
and ButtonProxy.rftcust files to the customization directory and restart Functional Tester to test the sample application-under-test
(AUT).
Verify the proxy deployment
You can test the java.awt.Button and javx.swt.JButton controls
that are provided as part of the AWTButtonApp and JButtonApp AUTs.
- Before you deploy the proxies, notice that the Proxy Class
Name (#proxy) property under Administrative properties for
java.awt.Button and javx.swt.JButton TestObjects are .java.awt.ButtonProxy and .java.jfc.AbstractButtonProxy respectively.
These are the default values for these controls.
- After you deploy the proxies, you see the following:
- sdk.sample.awt.ExtendedButtonProxy as the newly developed proxy for java.awt.Button
- sdk.sample.swt.ExtendedJButtonProxy as the newly developed proxy for javx.swt.JButton
Verify the descriptive name change
You can verify
the descriptive name change:
- Before you deploy the proxies, the java.awt.Button and javx.swt.JButton
controls record a mouse-button click as button.Click()
- After you deploy the proxies, the java.awt.Button and javx.swt.JButton
controls record a mouse-button click as button_button.click() and jbutton_button().click() respectively
as the proxy changes the descriptive name given to the TestObject for these
two controls.