Custom component Automation – Part II
prerequisite: read the part I session on custom component.
What all information is needed to make a flex component automatable.
1. Record support of the user interactions.
2. Replay support of the recorded script.
3. Allowing verification of the properties of the object.
4.Allowing to get the tabular representation of the object (if applicable)
5. Provide test friendly methods to get specific data from the component.
These are done by different different components in the automation framework.
We will understand how each thing can be done. Now let us discuss mainly on the recording and replay aspect in the first step.
What all delegate should do?
1. Provide the recording and replay of user interaction based component.
2. Provide information about its chidren and ways to access them, if they are a container type.
Let us discuss on this in details:
1. Identify the events on the component which needs to be recorded.
2. Add event listeners for these events in the delegate.
3. Identify information which needs to be captured from the event, which can be later needed to recreate the event properly and identify the user interactable component.
4. Collect these information and pass to the automation manger to record. If these information is not part of the event (special case, we wil discuss this later. TBD)
5. Have an entry in the XML file to describe the event for the component which talks about the required arguments of the event.
Working with Delegates :
Let us take each of this case and address one by one. I am planning to cover each of these case. As time permits i will cover and add the links here.
1. Extending from non container class, but current class is contianer.
refer – https://raniskumar.wordpress.com/2010/04/12/cca_containerclass
2. Extending from contianer class, but current class would like to be treated as a single unit.
3. Item renderer automaiton
3. How to handle new events to existing classes/derived classes or handle less events of the existing/derived components.
4. How to get special data for testing from the component
5. How to get tabular data of the component etc…