Configuring automation environment using Maven

It is clear to us that automation libraries are added to the project not like the other libraries. They are forcefully added by using the -include-libraries as the compiler argument.

How to achieve this in Maven(Flex-Mojos)?

Option 1:

In your automation profile, add the swc dependency with internal scope.




Flex-mojos supports 6 scopes:

  • merged: this is the default value, when not defined will assume merged. That means SWC/SWF file will be bigger and self sufficient. Same as -compiler.library-path
  • internal: all dependency content will be included on target SWC/SWF. Biggest compiled file. Same as -compiler.include-libraries
  • external: no dependency content will be included on target SWC/SWF. Smaller compiled file. Makes no sense to use this scope on SWF compilation. Same as -compiler.external-library-path
  • rsl: no dependency content will be inclued on SWC/SWF. But, SWF will have a reference to load it a runtime. Do not use on SWC compilation. Same as -runtime-shared-library-path
  • caching: same as RSL, but uses Adobe signed SWZ files.
  • test: libraries required to run tests. Same as -compiler.include-libraries, but at test template only!

Option 2:

Provide these information in the flex-config.xml file of the sdk to be used as follows.


This sould be inside the <compiler> </compiler> tag.

May 16, 2012 at 10:17 am 1 comment

Automation double click events in Flex components.

There is no direct way  to achieve this.  You can make your component support a special double click event.

e.g Assume you want to support double click on button

create MyButton which extends Button

Listen to mouse double click event, dispatch a custom event e.g ButtonDoubleClickEvent

Create a delegate class for MyButton  (MyButtonAutomationImpl which extends ButtonAutomationImpl)

listen to ButtonDoubleClick event and send for recording (refer any of the delegate classes for sample code)

Add details of ButtonDoubleClick event in the tool XML.


Why it does not work:

Automation works based on the highlevel event and clear of the other events in the sequence.  e.g Mouse down is considered as the new event. So it cleared. So a double click will be treated as two clicks. So having the custom event, prevents us from listening to the double click event instead the custom event.

I think chart has special double click event.

July 21, 2011 at 12:53 pm Leave a comment

Record replay works , but other features of QTP such as object spy, hightlight in application does not work?

If you are facing the above situation in QTP, one of the strong reason could be that you are using an incompatable wmode option.

what is that ? in your html, if you have mentioned the wmode value as transparent or opaque, automation does not work with the tools which needs the  hwnd of the flash player.  e.g QTP.

why it does not work?

The window associated with the plugin client is registered using the hwnd. When the swf is loaded through the flash player, which is embedded in the html page, if the wmode is window, there is a separate window (and hence an hwnd-window handle) associated with the player. This is used to uniquely identify the swf for automation.

When the wmode is opaque or transaprent,  there is no separate window for the flash player, hence the unique identification of the flashplayer does not work.  The window gets associated with the browser and since the flash player identity is lost, all the flash components will be recognized as web elements.

What to do?

There is no best solution here other than changing the wmode option.  May be you can use a different html with the required wmode setting for testing.

Some useful information

what is wmode ?

Pre flash player 10

  • wmode– Possible values: window, opaque, transparent. Sets the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser.
    • window – movie plays in its own rectangular window on a web page.
    • opaque – the movie hides everything on the page behind it.
    • transparent – the background of the HTML page shows through all transparent portions of the movie. This option can slow animation performance.

    For complete details  refer –

What is the significance of transparent and opaque with hwnd ? (taken from

By default, the Flash Player gets its own hWnd in Windows. This means that the Flash movie actually exists in a display instance within Windows that lives above the core browser display window. So though it appears to be in the browser window, technically, it isn’t. It is most efficient for Flash to draw this way and this is the fastest, most efficient rendering mode. However, it is drawing independently of the browser’s HTML rendering surface. This is why this default mode (which is equivalent to wmode=”window”) doesn’t allow proper compositing with DHTML layers. This is why your JavaScripted drop-down menus will drop behind your Flash movie.
In windowless modes (like opaque), Flash Player doesn’t have a hWnd. This means that the browser tells the Flash Player when and where to draw onto the browser’s own rendering surface. The Flash movie is no longer being rendered on a higher level if you will. It’s right there in the page with the rest of the page elements. The Flash buffer is simply drawn into whatever rectangle the browser says, with any Flash stage space not occupied by objects receiving the movie’s background color.

July 21, 2011 at 12:08 pm Leave a comment

Custom component Automation – Part III – Container class extending from non container class




Custom Component automation presentation


  •  read the part I session on custom component automation.…n-introduction

 read the part II session on custom component automation.

Custom component automation  – Container class extending from non container class

In this post I would try to explain the steps to be followed for handling the case of  a custom class which was extending from a non standard container class, but the class need to be treated as the container class.

e.g Your custom class MyClass extending from UIComponent (which is a non container standard framework class), eventhough as  a standard class it does not represent a container, it allows  to use the class as container programatically by using addChild, getChild etc. 

So if your extended class is meant to be a contianer (i,e if you woud like to get the children objects what you added in your base class), you need to program for the same.   The section explains how you can expose your children so that the user interaction on  those components can be supported. (e.g a button inside your contianer . Your script should look like

Application …… MyClass. childButton .click

i.e this sample does not cover how to expose events and user interaction on the MyClass. it coveres how the script can access the childButton in MyClass


  • Have your class MyClassAutomationImpl extend from UIComponentAutomationImpl
    • Refer the constructor and init in the sample delegate


  • Override the following methods (Note sample are only to explain the concept. It would not have followed all coding conventions)
    •  numAutomationChildren  – this method should have the logic to find the number of children in the component and return. If your component is a fixed element contianer you can provide this detials. If your component is a container to the user and number of children is based on usage, this need to be computed and returned. (for calculation logic samples refer application)         

               override public function get numAutomationChildren():int{return 2;}


    • getAutomationChildren  – return children – calculated and or known.

 override public function getAutomationChildren():Array{

var childrenArray:Array = new Array();



return childrenArray;


    • getAutomationChildAt- return children – calculated and or known.

override public function getAutomationChildAt(index:int):IAutomationObject{

if(index ==0)

return customContainer.button1;

else if (index ==1)

return customContainer.button1;


return null;


    • createAutomationIDPart- create the part information of the child. Automation framework already has the logic of calculating this.  This internally uses the automationName and automationIndex to calutate this. However if you have a separate logic for calculating these, you can pass your callback methods here. Else, simply copy pase the following lines.

override public function createAutomationIDPart(child:IAutomationObject):Object{

var help:IAutomationObjectHelper = Automation.automationObjectHelper;

return help.helpCreateIDPart(uiAutomationObject, child);


    •   createAutomationIDPartWithRequiredProperties– create the part information of the child only using the requried properties as part of the part object.  This internally uses the automationName and automationIndex to calutate this. However if you have a separate logic for calculating these, you can pass your callback methods here. Else, simply copy pase the following lines.

 override public function createAutomationIDPartWithRequiredProperties(child:IAutomationObject, properties:Array):Object{

var help:IAutomationObjectHelper = Automation.automationObjectHelper;

return help.helpCreateIDPartWithRequiredProperties(uiAutomationObject, child,properties);


    •   resolveAutomationIDPart– find the object using the part information.  This internally uses the automationName and automationIndex to calutate this. However if you have a separate logic for calculating these, you can pass your callback methods here. Else, simply copy pase the following lines.

 override public function resolveAutomationIDPart(part:Object):Array{

var help:IAutomationObjectHelper = Automation.automationObjectHelper;

return help.helpResolveIDPart(uiAutomationObject, part);


Have the entry for this class in the xml file.  For that you can do the follow.

  • Get the section of the base class entry in the existing xml file.
  • Copy the contents, change the details as appropriate
  • e.g
    <ClassInfo Name=”MyClass” GenericTypeID=”table” Extends=”FlexObject” SupportsTabularData=”false”>

<IconInfo IconFile=”TEAPluginQTP.dll” IconIndex=”207″/>


<Implementation Class=”mx.controls::MyClass”/>


April 12, 2010 at 8:50 am 13 comments

Custom component Automation – Part II

prerequisite:  read the part I session on custom component.…n-introduction

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?

Basically they

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:

Provide recording.

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 –

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…

April 12, 2010 at 6:11 am 6 comments

QTP versions and Supported IE Versions


The table  below shows the versions supported for the Flex plugins for QTP

QTP Version IE6 IE7 IE8
QTP 9.2 Yes No No
QTP 9.5 Yes Yes No
QTP 10 No Yes Yes

QTP10 and 1E6 also theoritically seem to work. But it is not a supported combination from Adobe as we have not done extensive testing on this combination.

December 7, 2009 at 11:06 am 4 comments

Enabling log for QTP 9.5

Please follow the  steps below to enabled Log for QTP 9.5

  1. Go to the command prompt and navigate to C:\Program Files\HP\QuickTest Professional\bin directory and invoke ClientLogs.exe.
  2. Select QTP in the left dialog.
  3. Select LogCatPackTEA and move it to the selected category.
  4. Change the Category level to Debug2 .
  5. Give the folder path where you want the log to be stored.
  6. Click on Apply.
  7. Restart QTP.

 Please not that there is a problem in QTP 9.5  such that when the user enables the QTP log recording does not work on flex applications. This issue has been resolved in QTP 10 and i beleive QTP has a patch to solve the issue for 9.5.  (I got a patch from QTP and it works on my machine)

If you are on 9.5 with all latest patch updated and if you are facing the recording issue, please let us know  (ideally a bug in JIRA – adobe bugbase) with the version details.


December 7, 2009 at 11:01 am 1 comment

Older Posts


  • Blogroll

  • Feeds