Flex Automated Testing Recording

When the user records a new test in Silk Test Workbench for a Flex application, the following events occur:

  1. Silk Test Workbench calls the Silk Test Agent to start recording. The Agent forwards this command to the FlexTechDomain instance.
  2. FlexTechDomain notifies AutomationManager to start recording by calling beginRecording(). The AutomationManager adds a listener for the AutomationRecordEvent.RECORD event from the SystemManager.
  3. The user interacts with the application. For example, suppose the user clicks a Button control.
  4. The ButtonDelegate.clickEventHandler() method dispatches an AutomationRecordEvent event with the click event and Button instance as properties.
  5. The AutomationManager record event handler determines which properties of the click event to store based on the XML environment information. It converts the values into proper type or format. It dispatches the record event.
  6. The FlexTechDomain event handler receives the event. It calls the AutomationManager.createID() method to create the AutomationID object of the button. This object provides a structure for object identification. The AutomationID structure is an array of AutomationIDParts. An AutomationIDPart is created by using IAutomationObject. (The UIComponent.id, automationName, automationValue, childIndex, and label properties of the Button control are read and stored in the object. The label property is used because the XML information specifies that this property can be used for identification for the Button.)
  7. FlexTechDomain uses the AutomationManager.getParent() method to get the logical parent of Button. The AutomationIDPart objects of parent controls are collected at each level up to the application level.
  8. All the AutomationIDParts are included as part of the AutomationID object.
  9. The FlexTechDomain sends the information in a call to Silk Test Workbench.
  10. When the user stops recording, the FlexTechDomain.endRecording() method is called.