Examples you can use
Extended Capabilities : Adding more properties
This proxy sample extends the proxy methods public java.util.Hashtable getProperties() and public Object getProperty(String propertyName) to add a new property simpleValue.
Set up a simple value class and value manager
This proxy sample returns a user-defined data type (value class and value manager) as a return value for the property simpleValue.
Extend the record capability
This proxy sample extends the public void processSingleMouseEvent(IMouseActionInfo action) method to extend the recording behavior so that single clicks are recorded as doubleclick() methods and double-clicks are recorded as click() methods.
Deploy the binary files
Copy the ButtonOverrideProxy.jar and ButtonOverrideProxy.rftcust files to the customization directory and then restart HCL OneTest UI to test the sample application-under-test (AUT).
Verify the added property and value class
You can test the java.awt.Button and javx.swt.JButton controls, provided as part of the AWTButtonApp and JButtonApp AUTs.
- Before you deploy the proxies, run testObject().getProperty("simpleValue"). This throws the error message, simpleValue is not a valid property.
- After you deploy the proxies, run testObject().getProperty("simpleValue"). This returns the value, FuBar.
Verify the recording behavior
- Before you deploy the proxies, the java.awt.Button records single-clicks as button.click() and double-clicks as button.doubleClick().
- After you deploy the proxies, the java.awt.Button records single-clicks as button.doubleClick() and double-clicks as button.Click(). The click() and doubleClick() methods are swapped.