0 Replies Latest reply on May 24, 2007 2:06 PM by Mark_Sawers

    Flex Automation: RegisterUserFunc fails

    Mark_Sawers
      Has anyone had success with registering user-defined functions in QTP for Flex components? This is a mechanism whereby standard method implementations are replaced with custom ones and new methods can be added.

      I've tried it with FlexTextArea, FlexButton and FlexCanvas. I get the following dialog:

      Run Error: Object doesn't support this action: 'Flex<ComponentType>(...).<Method>'

      I validated my approach is with a Browser app's WebEdit.


      Code:

      Function MyClick
      MsgBox "worked"
      End Function

      RegisterUserFunc "FlexButton", "Click", "MyClick", False
      Browser("Runtime Loading Sample").FlexApplication("automationExample").FlexApplication("prototype.swf").FlexButton ("releaseButton").Click