0 Replies Latest reply on Jul 18, 2011 4:46 PM by AutoTestFlex

    Flex QTP Automation issue- Spark ComboBox

    AutoTestFlex

      Hello,

       

      I am in process of automating a complex application built on Flex (SDK 4.1) using HP QTP 10.0. I have been quite successful till now in automating standard components as well as creating Delegates Classes for ItemRenderer, Custom Components etc.

      Now when things looked positive, I am caught in a weird issue related to Spark Combo Box, and its integration with our Application. At some places, recording an action on Combo Box gives following Flash Player error:

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at mx.automation.codec::RendererPropertyCodec/encode()[E:\SVN\4.x\frameworks\projects\automa tion\src\mx\automation\codec\RendererPropertyCodec.as:65]
          at mx.automation.qtp::QTPAdapter/getPropertyValue()[C:\work\flex\dmv_automation\projects\qtp \src\mx\automation\qtp\QTPAdapter.as:698]
          at mx.automation.qtp::QTPAdapter/encodeProperties()[C:\work\flex\dmv_automation\projects\qtp \src\mx\automation\qtp\QTPAdapter.as:732]
          at mx.automation.qtp::QTPEventDescriptor/record()[C:\work\flex\dmv_automation\projects\qtp\s rc\mx\automation\qtp\QTPEventDescriptor.as:91]
          at mx.automation::AutomationManager/recordAutomatableEvent()[C:\work\flex\dmv_automation\pro jects\automation_agent\src\mx\automation\AutomationManager.as:2294]
          at mx.automation.delegates.core::UIComponentAutomationImpl/recordAutomatableEvent()[E:\SVN\4 .x\frameworks\projects\automation\src\mx\automation\delegates\core\UIComponentAutomationIm pl.as:387]
          at spark.automation.delegates.components::SparkDataGroupAutomationImpl/recordDataGroupItemCl ickEvent()[E:\dev\4.x\frameworks\projects\automation_spark\src\spark\automation\delegates\ components\SparkDataGroupAutomationImpl.as:251]
          at spark.automation.delegates.components::SparkDataGroupAutomationImpl/mouseDownHandler()[E: \dev\4.x\frameworks\projects\automation_spark\src\spark\automation\delegates\components\Sp arkDataGroupAutomationImpl.as:208]

       

      Flash Log gives following error on loading the Spark ComboBox:

      AutomationManager:createDelegate() - Error #1009: Cannot access a property or method of a null object reference.
      AutomationManager:createDelegate() - Delegate object couldnot be created

       

      The irony is that the same component (Spark ComboBox) works fine at few places in the application, i.e. I can record and play with ease. I tried comparing the respective classes but nothing different turned up. At one time seemed like ViewStack is causing the issue but it wasn't consistent. I am using Static automation Method from Adobe in which code is compiled with Automation SWC Libraries.

       

      Even if I give same data to combo boxes in different areas, it still works in similar fashion, by recording fine in some and throwing error in others. So it is not related to Data for sure.

      <s:ComboBox  dataProvider="{new ArrayCollection([{data:'value1'},{data:'value2'},{data:'value5'}])}"                                        
                                               width="100"
                                               labelField="data"
                                               height="20">

      </s:ComboBox>

       

      Now another weird behavior is that if I replace the Spark ComboBox with Halo it works fine in all places. So issue is specific to Spark.

       

      I guess this issue is tightly coupled with the Application itself, which is built on Spring Framework. So I am not able to isolate and reproduce it into independent code yet. In case anyone has faced this kind of issue please let me know. It will be of great help. Thanks in advance!

       

      Regards

      Sohdeep