Flex Objects not recognized by QTP - QTP Advanced
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.
To install flex plug-ins follow this link
Source: QTP Advanced - Kashyap
Adi, I can recommend TestComplete as a very good tool for automating flex applications. It is able to identify complex SmartGrid flex controls and the best part is it does not need your application to be pre compiled with the flex libraries, hence no change in application state is required (this has been found to be very cumbersome with qtp and also needs a lot of dev intervention)
ReplyDeleteTestComplete is actually able to inject a FlashInjector at runtime allowing us to get the application state and object hierarchy at runtime. TC for me is the tool of choice for Flex automation