Flex custom control support
HCL OneTest™ UI supports testing functional aspects of Adobe® Flex custom controls in a generic and specific way.
About this task
HCL OneTest™ UI support Flex custom controls in two different ways:
- Generic support:
HCL OneTest™
UI supports recording and playback of
scripts. Recording is generic and methods
performAction(eventname,
. For example,arg1
arg4
);flex__randomWalk_RandomWalk1().performAction(
Select
,Food
);HCL OneTest™ UI cannot capture data verification point and does not support data-driven testing in generic support. Data verification point is achieved using thegetProperty()
method and by verifying the value. For example:
Data-driven testing is supported by using an action and associating the argument value with a dataset. Since data-driving is control specific, a generic method is not available using drag-hand. For example,String selectedItem = (String)list__randomWalk_RandomWalk1().getProperty("selectedItem"); String verificationData = "TestVerify"; if(selectedItem.equalsIgnoreCase(verificationData)) { //code to do }
flex__randomWalk_RandomWalk1().performAction(
Select
,dpString( variableName/index));For HCL OneTest™ UI to support Flex custom control in a generic way:
- You must write a delegate for the custom control. Delegate is an actionscript class which allows automation framework to understand the events from the control. References are available in Flex Builder directory where a delegate exists corresponding to each standard control. For more information see, Flex Data Visualization Developer's Guide in the Adobe site.
- Map the custom control with its events and properties in the FlexEnv.xml file located in the bin folder of the HCL OneTest™ UI installation directory.
- Every new custom control is mapped to the base proxy
flexObjectProxy
, and base test objects are mapped toFlexObjectTestObject
.
- Specific support: Proxy and test objects are created. The proxy is mapped to the control in the .rftcust file that is generated while creating the proxy using the proxy SDK wizard. Data verification point and data drive is created in the new proxy as required. Role are assigned to the control. Recognition properties are added to the control.