How to enable the application for Flex Automation.

August 13, 2009 at 5:16 pm 14 comments

How do I know my application is ready to support Flex Automation?

There are plenty of tools avaialble for Flex Automation .  e.g Silk Test (Borland), RFT (IBM), FAAT , RIATest, Compuware etc.   This section is related to QTP, but in theroy , this may be applicable other tools also.

Please go through each of the below questions and find answers about your setup.

First let us cover about Flex Application.

  • Am I using the premium/professional version of Flex/Flash Builder ?
    • Automation is a premium feature and the libraries needed for Flex Automation will be available with FlexBuilder only.  (You can refer my blog about licensing to know more about applying license)
    • If you are using Trial/Stanard version, you can try out the feature with limited record and reply support. However you may not get the libraries for 2.0.1 in this case.

 

  • Am I using the correct version of sdk and  Flex Automation  libraries? Supported version of sdk : Flex 2 onwards. However when Adobe mentions about a new feature suport ensure that you are using correct version of sdk and matching automation.
    • How to know the version of the libraries ? open the swc’s with a zip unitlity and check the config.xml file. refer the entry as follows. <flex version=”4.0.0″ build=”6644″ />  Use this details when referring a Felx Automation problem to Adobe.

 

  • Have I enabled my application for Flex Automation support ?
    • Application created by default does not have the necessary details for Flex Automation. The application should be enabled for automation by adding the required linrarie to your application by using -include-libraries “path to automation.swc”  “path to automation_agent.swc” “path to qtp.swc””  (and other automtion libraries as you need)
  • Am I launching the application in the correct browser ?
    • QTP  automation for flex is supported only Internet Explorer. And please ensure that there is a unique id mentioned for the application in the html used for hosting the swf.

 

Now we are ready with the application let us check the details from the QTP side.

  • Do I have the correct version of QTP ?
    • Flex Automation is supported for QTP from 9.2 version.  Recommended is 9.5 and above.
  • Have I installed the plugin ?
  • How do i know that the plugin is installed ?
    • Once the plugin is installed , while starting QTP, the plugin will be shown in the addins for QTP.  (Please note that accidental removal of the dll’s will show the plugin in the QTP, but operations will not work as expecetd. )

 

Now set up is ready. Now let us start the application and start with automation.

Start QTP, enable the flex add-in, launch the application in IE,  start recording in QTP , click on the application and check that your interactions are being recorded. If so, CONGRATULATION!! your set up is working.

If not working, let us figure out whether it is a QTP set up issue or application issue.  Please  try recording the user interaction on http://www.adobe.com/devnet/flex/samples/flex_store_v2/. If you can record these, your set up is fine, but you have some issue with application. Please check the steps above regarding application.

If you are not able to record the application in the link mentioned above.  Please follow the QTP related steps. If still no luck,  uninstall plugin,  unistall QTP, install QTP and install plugin . Try again. At time QTP installation can be corrupted and uninstallation does not happen properly. Try the http://knowledgeinbox.com/downloads/qtp/qtp-clean-uninstaller-v2/

If nothing helps, please contact us at Adobe using the bugbase http://bugs.adobe.com/jira/secure/Dashboard.jspa under the project FlexEnterprise and Test Automation Components.

You can find help in Flex/Flash builder under the section “Creating applications for testing”.

http://labs.adobe.com/wiki/index.php/Flash_Builder_4:Release_Notes#Install_and_Configure_Flex_and_AIR_Automated_Testing also gives you the details on flex automation.

Advertisements

Entry filed under: Flex Automation.

Automation Issues – controls non clickable Custom Component Automation – XML Details

14 Comments Add your own

  • 1. PS  |  September 3, 2009 at 10:53 am

    I have QTP 10. I downloaded Flex 4 QTP installer from http://download.macromedia.com/pub/labs/flex/4/flex4_automation_install_060109.zip and installed it. I opened a new test and opened a website http://examples.adobe.com/flex2/inproduct/lcds/flexstore/flexstore.html in IE 7. While recording it recorded the script but when running the script it shows an error

    script sample:

    1. Browser(“FlexStore”).FlexApplication(“flexstore”).FlexToggleButtonBar(“_ToggleButtonBar1”).Change “Products”
    2. Browser(“FlexStore”).FlexApplication(“flexstore_2”).FlexCanvas(“Products”).FlexPanel(“Browse”).FlexCanvas(“Nokia 6010”).FlexLabel(“_Text1”).Click

    error:
    Object doesn’t support this property or method: ‘Browser(…).FlexApplication’

    any idea why it is not running but only recording

    in OR also it shows the objects but no info about those on the RHS when selected.

    Reply
    • 2. raniskumar  |  September 3, 2009 at 11:02 am

      Looking at the script lines and the errror, there seems to be some issue with the QTP. You can see that first line FlexStore object and second line, has two separate id’s for the flex store application object.
      Verify these objects in the object repository and check what makes these two objects different. Normally when the users face this issue what we have observed is that the QTP installation has some problem and the issue got rectified by the clean uninstallation (refer the link for the same in the blog).
      And ensure that the application is restarted before replay (that does not seem to be the problem).

      Reply
  • 3. Bill Bartmann-  |  September 14, 2009 at 1:11 pm

    I’m so glad I found this site…Keep up the good work I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say GREAT blog. Thanks,

    A definite great read…

    -Bill-Bartmann

    Reply
  • 4. Locale libraries for automation « Flex Automation  |  September 22, 2009 at 1:38 pm

    […] need the automation libraries and the locale libraries. (refer https://raniskumar.wordpress.com/2009/08/13/how-to-enable-flex-automation/ for […]

    Reply
  • 5. ARC  |  March 1, 2010 at 1:14 pm

    Hi,

    I am using QTP 10 and I am able to recognize Flex Objects of FlexStore sample application when I load it with run time loading automation support (see).

    So my there is no problem with QTP or Flex 3.0 automation setup as QTP is working fine with the sample Flex Store application. But the actual application that I have to automate is a Flex application that loads external libraries. And it gives me following error when i try to load it using run time loading automation support:

    ReferenceError: Error #1069: Property initializePendingConfigurations not found on runtimeloading and there is no default value.

    This article has proposes a solution with code but i am confused on where should write that code? Can someone help?

    Thanks.

    Reply
    • 6. raniskumar  |  April 13, 2010 at 1:07 pm

      Hi,

      When using runtime loading, automation will work for the external library components if they are in the same applicatio domain of the mail app. So the app which loads the external library (e.g your main app loads subApp .. )so the Loader in the mainApp should have the code mentioned in the link refered by you.

      Reply
  • 7. Shubhra  |  May 12, 2010 at 5:46 am

    Hi,
    I was trying to search in http://www.adobe.com/support/documentation/en/flex/3/releasenotes_flex3_fb.html#install_automated_testing and other links but unable to find – Does the Flex Automated Testing tool work on Mac OS X also?

    Reply
    • 8. raniskumar  |  June 10, 2010 at 10:20 am

      QTP – No
      i am not sure abou the other tools. Ideally there should be a quite few.

      Reply
  • 9. Vibha  |  September 29, 2010 at 10:12 am

    Hello raniskumar, I have Flex Builder 3 professsioal version. Even I installed QTP and its Flex Plug-in. Also did the changes in the Compiler options.
    I am getting the error as Unable to open “C:\Program Files\Adobe\Flex Builder 3\sdks\frameworks\libs\automation.swc”

    Also, I am unable to see the Add-in manager in QTP.

    What might be wrong? Put some light on this.

    Reply
    • 10. raniskumar  |  February 11, 2011 at 1:55 pm

      Did you check the path “C:\Program Files\Adobe\Flex Builder 3\sdks\frameworks\libs\automation.swc” is the swc really present ?
      is the QTP plugin registered ? check your registry entry.

      Reply
    • 11. raniskumar  |  July 21, 2011 at 1:04 pm

      Unable to open “C:\Program Files\Adobe\Flex Builder 3\sdks\frameworks\libs\automation.swc” – do you have this files on your machine ?

      How did you instal the flex plugins ? if they are not showing up, registration did not work. try uninstalling and installing again.

      Reply
  • 12. Pradip Jadhav  |  December 28, 2010 at 6:53 am

    Hi,
    I am using QTP 10 and its working fine to recognize flex objects. But i am having one issue, In my application i am having left menu bar and on mouse over of menu header i am expanding the contents which are under that menu header. But on mouseOver for menu header it throwing an error.

    Will you please tell me because of what that error is coming?

    I am using Flex 4.0 Plugin.

    Thanks in advance.. 🙂

    Regards,
    Pradip Jadhav

    Reply
  • 14. Palanivelu  |  August 28, 2012 at 10:30 am

    Hi all,
    I am using QTP11 with IE8/ IE7 and FlexBuilder3, my QTP objectspy is not show the flex object properties it shows objectwindow for all the objects and when I try to record objects are not recording.

    Please any one help me or email me the solutions to palanivelunm@gmail.com.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

August 2009
M T W T F S S
« Jul   Sep »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Most Recent Posts


%d bloggers like this: