Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
468
Capture a Tool Tip from a SwfButton
posted

Is there a method to capture the tool tip from a SwfButton? I tried the MouseHover event but I'm lost from there. Can someone help me on this?

 

Thanks in advance,

Fred

Parents
  • 7695
    Offline posted

         It is possible, but you need to work with your developer to make it happen. You would need to have your developer store the tool tip text in an area that you can retrieve like the controls Tag property. With that you can retrieve the information via any number of means. Such as QTP's methodology of : control.Object.Tag or control.GetTOProperty("Tag") or Infragistics control.GetNAProperty("Tag") as examples.

     

         As to why this is the only viable reason I will explain, for starters, most if not all controls, do not have a "ToolTip Property". They have no inherent ability to show tooltips. Tooltips are typically handled by helper components. The two pertinent ones for this forums being either the base System.Windows.Forms.Tooltip and Infragistics.Win.UltraWinToolTip.UltraToolTipManager which they both generally work the same. There are two was in which they can work, first is you add the control you want to have a tooltip for, and the tooltip itself to a collection in this component, and when this happens, it starts listening to the appropriate mouse events of the control so that it can show tooltip at the appropriate time. The other is you can call have them triggered by your own events, and call a Show() method which doesn't have to be even tangentally related to control in any way.

         That being said, what does it mean. Since the tooltip itself doesn't reside on the control, but on a separate component, there is no way for that control to reference that tooltip. Also because the object that the tooltip does reside on is a component without a UI presence and not a control, QuickTest Professional cannot add it to the Object Repository so that it can interact with it. 

         If you were to retrieve the component, and it is possible if you have your developer make a property to reference it, to get the tooltip for a particular control requires a method call that takes in an object of Type Control as the parameter, to retrieve that tooltip. QuickTest Professional does not pass in objects well, and because of this, it will always return an empty string or null. 

         Also due to the nature and timing of Tooltips, QTP checkpoints do not seem to work because the act of attempting to interact with the image or text, causes the tooltip to disappear.

    I hope this answers your question,

     

Reply Children
No Data