Tuesday, January 4, 2011

Flex Objects not recognized by QTP

This is a commonly seen issue that QTP is not recognizing a particular flex object even though you have installed the Adobe Flex Plug-in and the library files are deployed with the flex build. There could be many ways to resolve this. The object could be recognized as a win object, macromedia flash object or a basic flex object like the one shown below.


I have a checklist that may help in resolving this:

1. Have you installed the flex plug in correctly? My blog below should help you verify that:
http://qtpadvanced.blogspot.com/2011/01/verify-install-of-flex-plug-in-for-qtp.html




2. Have you selected the required add ins for your application? Typically for a flex based web application requires flex, web and activex plug ins selected in the QTP's Add-in manager. Remember that QTP add-in manager loads at run time only and if you are not seeing this at start-up then it could be disabled within QTP Tools-> Options -> General.

3. If the object is only partially recognized by QTP and if it is an input field that can accept keyboard inputs they try the QTP SendKey method on that object. This uses the object.Type method to send keyboard inputs. If this works then this should knock off most of the text input objects.

4. The object could have been configured to work based on user action. For example a small window could open with options when user selects that object/ clicks on it. There could be two such possibilities:
   a> An input field coded by developers by combining more than one standard flex components. Example: A spark.components.TextInput can be combined with spark.components.Group, spark.components.PopUpAnchor and a spark.components.List making it kind of a search-able intelligent field that loads the list based on user input.
   b> The component is a custom component that has inherited the standard flex component. In such cases this may require "Instrumentation" of this component. This necessitates the developers to create a delegate class for this component which sends flex automation events that QTP can intercept while recording.
This adobe site link should give you insight into the instrumenting custom components:
http://livedocs.adobe.com/flex/3/html/functest_components2_11.html

Also check to make sure that the object in question has a class definition entry in the automation xml file. This link should give you more information on the class definition entry:
http://livedocs.adobe.com/flex/3/html/functest_components2_15.html#178953


5. There are a few cases available in the HP knowledge base which may be worth looking at but this may or may not help you resolve your problem. HP however states clearly that the plug-in is developed, maintained and supported by Adobe and that Adobe is the point of contact for any issues with respect to QTP and Flex automation.

6. Check in the Adobe Bug and Issue management system which is meant for public to log in and create or search issues. Searching this database could be very useful since there are a huge number of bugs logged and resolved by Adobe.
Here is the link: http://bugs.adobe.com/flex/
This requires registration to create or search bugs logged with Adobe. Just register and you can look into them.

6 comments:

  1. Hi Kash,

    I like your posts and thats some really good info u have shared.

    This surely makes it a candidate on my blog which has the best articles and posts across the web.

    Do mail me at aditya_kalra@ymail.com and let me know if it is fine i add this to my blog.

    My blog: http://go-gaga-over-testing.blogspot.com/

    Best Regards,
    Aditya Kalra

    ReplyDelete
  2. Hi ,
    I am facing problem regarding testing FlexCustomComponents with QTP..

    Actually my FlexApplication is installed on remote machine (ex: 192.30.30.21 machine)
    and QTP with Flex plugin is installed on another machine .. I am able to access my FlexApplication in QTP through url (http://192.30.30.21/myFlexApp) ...

    But my FlexApplication also has complex customcomponents .... for example ....

    I have a customPanel extending Panel .. my custom panel's title bar has few images and buttons ... i somehow instrumented customPanel and its titleBar too ... i have deployed customPanelAutomationImpl.as delegate file in the FlexApplication and included that delegate in the buildscript of the FlexApplication .... also i have added customPanel entry into the TEAFlex.xml(present in flexPlugin folder) ... but QTP is still not recognising the customPanel ...

    Can anybody pls help me with this issue .... ? any help would be appreciable ..

    Thanks ..

    ReplyDelete
  3. What are the setting required for UFT 12.52 to identify the flash objects?
    Can the objects be identified without installing the Flex automation plug in and Recompiling the Flex Application?

    ReplyDelete
  4. This is great, thanks for sharing. Also, check this out if you are looking for professional website or logo design services:


    Buy Logo

    ReplyDelete
  5. First I want to tell you Thank you for sharing it with us.
    I am really Happy and impressed to see this blog!
    law essay writing help

    ReplyDelete