2 Replies Latest reply on Dec 12, 2009 10:06 AM by Lukasz Wecirz

    Automation QTP // Mouse Rollover Recording Fails

    blackboxboom Level 1
      I have the QTP configured with Flex and I am able to record most events. Attempting to record a mouse rollover results in the following error : “Error: Unable to find automation method 'flash.events.MouseEvent' for class 'name: FlexImage superClassName: FlexLoader”. My app is a simple image which applies two states to display the image. It utilizes the Automation.automationManager.recordAutomatableEvent method for the target event, within the “rollover” event handler. Also, I override the “replayAutomatableEvent(Event)” method calling the Automation.automationObjectHelper.replayMouseEvent() for the MouseEvent.ROLL_OVER event. The error propagates from the MouseMove event as reported in the stack trace –Click and ChangeFocus also are reported. I’ve added the rollover event to the “TEAFlex.xml” file. Its my understanding that any event outside of those defined in the “QTP Object Type” document for each control can be configured in the “TEAFlex.xml” file, for any control descending from UIComponent. I received a similar error after extending the ProductCatalogThumbnail ( Canvas ) class contained in the flex store code, though this error propogates from Scroll. Can you determine why ( in the first case ), the rollover is failing?

      Stack trace:
      Error: Unable to find automation method 'flash.events.MouseEvent' for class 'name: FlexImage
      superClassName: FlexLoader
      event2descriptor: (Object)#0
      flash.events.FocusEvent|keyFocusChange = (mx.automation.qtp::QTPEventDescriptor)#1
      eventClassName = "flash.events.FocusEvent"
      eventType = "keyFocusChange"
      name = "ChangeFocus"
      flash.events.MouseEvent|click = (mx.automation.qtp::QTPEventDescriptor)#2
      eventClassName = "flash.events.MouseEvent"
      eventType = "click"
      name = "Click"
      flash.events.MouseEvent|mouseMove = (mx.automation.qtp::QTPEventDescriptor)#3
      eventClassName = "flash.events.MouseEvent"
      eventType = "mouseMove"
      name = "MouseMove"'.
      at mx.automation::AutomationManager/recordAutomatableEvent()
      at ViewStates_wt3/dispatchLowLevelEvent()
      at ViewStates_wt3/__soup_rollOver()
      at [mouseEvent]
        • 1. Re: Automation QTP // Mouse Rollover Recording Fails
          RaniKumar Level 2

          If you are taking care of the record and the replay properly, this error can be over come in adding a section for the mouseEvent with type "rolloever" under the FlexImage section in the teaFlex.xml file

          • 2. Re: Automation QTP // Mouse Rollover Recording Fails
            Lukasz Wecirz

            Hi

            Has someone found a solution to that?

            I successfully run one test on QTP 9.2 and Flex plugin 3.0.0, after installing QTP 10 and the same plugin the QTP crashed on 'click' in one of steps (what is interesting it run many other clicks steps before and it was ok).

            The following error message was thrown by QTP 10:

             

            Unable to find automation method 'click' for class 'name: FlexButton
            superClassName: FlexObject
            event2descriptor: (Object)#0
              flash.events.FocusEvent|keyFocusChange = (mx.automation.qtp::QTPEventDescriptor)#1
                eventClassName = "flash.events.FocusEvent"
                eventType = "keyFocusChange"
                name = "ChangeFocus"
              flash.events.KeyboardEvent|keyPress = (mx.automation.qtp::QTPEventDescriptor)#2
                eventClassName = "flash.events.KeyboardEvent"
                eventType = "keyPress"
                name = "Type"
              flash.events.Mouse