3 Replies Latest reply on Mar 8, 2010 8:50 AM by Sam Souhrada

    Flex Automation with QTP 10 (SDK 3.2 & 3.5) Error

    Sam Souhrada

      I have been able to get very basic applications to work with the automation libraries and then with QTP.The issue I'm having is with the actual project I would like to automate. I have done all of the steps to install automation correctly and have also put the additional compiler arguments into flex. However when the application is initialzing I get the following errors:

       

      TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at mx.automation::AutomationManager$/addDelegates()[C:\work\flex\dmv_automation\projects\aut omation\src\mx\automation\AutomationManager.as:564]
          at mx.automation::AutomationManager$/addDelegates()[C:\work\flex\dmv_automation\projects\aut omation\src\mx\automation\AutomationManager.as:533]
          at mx.automation::AutomationManager$/addDelegates()[C:\work\flex\dmv_automation\projects\aut omation\src\mx\automation\AutomationManager.as:533]
          at mx.automation::AutomationManager$/addDelegates()[C:\work\flex\dmv_automation\projects\aut omation\src\mx\automation\AutomationManager.as:533]
          at mx.automation::AutomationManager$/addDelegates()[C:\work\flex\dmv_automation\projects\aut omation\src\mx\automation\AutomationManager.as:533]
          at mx.automation::AutomationManager$/addDelegates()[C:\work\flex\dmv_automation\projects\aut omation\src\mx\automation\AutomationManager.as:512]
          at mx.automation::AutomationManager$/addDelegates()[C:\work\flex\dmv_automation\projects\aut omation\src\mx\automation\AutomationManager.as:512]
          at mx.automation::AutomationManager/childAddedHandler()[C:\work\flex\dmv_automation\projects \automation\src\mx\automation\AutomationManager.as:263]
          at flash.display::DisplayObjectContainer/addChildAt()
          at mx.managers::SystemManager/preloader_preloaderDoneHandler()[C:\autobuild\3.5.0\frameworks \projects\framework\src\mx\managers\SystemManager.as:3135]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.preloaders::Preloader/displayClassCompleteHandler()[C:\autobuild\3.5.0\frameworks\proj ects\framework\src\mx\preloaders\Preloader.as:435]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.preloaders::DownloadProgressBar/timerHandler()[C:\autobuild\3.5.0\frameworks\projects\ framework\src\mx\preloaders\DownloadProgressBar.as:1451]
          at mx.preloaders::DownloadProgressBar/initCompleteHandler()[C:\autobuild\3.5.0\frameworks\pr ojects\framework\src\mx\preloaders\DownloadProgressBar.as:1503]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.preloaders::Preloader/dispatchAppEndEvent()[C:\autobuild\3.5.0\frameworks\projects\fra mework\src\mx\preloaders\Preloader.as:291]
          at mx.preloaders::Preloader/appCreationCompleteHandler()[C:\autobuild\3.5.0\frameworks\proje cts\framework\src\mx\preloaders\Preloader.as:443]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.5.0\frameworks\projects\framework\src \mx\core\UIComponent.as:9440]
          at mx.core::UIComponent/set initialized()[C:\autobuild\3.5.0\frameworks\projects\framework\src\mx\core\UIComponent.as :1168]
          at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild\3.5.0\frameworks\projects \framework\src\mx\managers\LayoutManager.as:718]
          at Function/http://adobe.com/AS3/2006/builtin::apply()
          at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild\3.5.0\frameworks\projects\framew ork\src\mx\core\UIComponent.as:8744]
          at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild\3.5.0\frameworks\projects\framewo rk\src\mx\core\UIComponent.as:8684]

       

       

       

      Here are the additional compiler arguments that I put into Flex:

       

      -include-libraries "C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\frameworks\libs\automation.swc" "C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\frameworks\libs\automation_agent.swc" "C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\frameworks\libs\qtp.swc" "C:\Program Files\Adobe\Flex Builder 3\sdks\3.2.0\frameworks\libs\automation_dmv.swc"

       

       

       

       

      Does anyone have any ideas on how to solve this? I've tried using the automation APIs for 3.2 and 3.5 but both yield the same result.