Forum Discussion

Dhana's avatar
Dhana
Contributor
12 years ago

Capture an image using Region checkpoint

Hi,



I have an functionality which deals with the mouse pointer behavior, in which i need to capture my application along with the mouse pointer. How do i do this by using Region checkpoints or is there any other way to do this?



Pls get me a solution.



Thanks.

4 Replies

  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Dhanalakshmi,


    How do i do this by using Region checkpoints ...


    Region checkpoints provide you with the Include mouse pointer setting that lets you identify whether the mouse pointer is included into the captured image. The corresponding setting is located on the Comparison Parameters page of the Region Checkpoint wizard.


    To command TestComplete to capture images with the mouse pointer, select the Include mouse pointer check box on the mentioned page.


    Does this help?

  • Yes Irina, this is what i need but it doesn't work when i implement this method. I want to capture a image with the mouse pointer to check which symbol of mouse pointer is been displayed, like Arrow or Cross cursor or other symbol.



    Pls refer to the attached image which got captured after enabling the Include mouse pointer check box.

     
  • irina_lukina's avatar
    irina_lukina
    Super Contributor

    Hi Dhanalakshmi,


    As far as I understand now, you just need to obtain the type of the cursor, right? If it's what you need, you can do this programmatically, without using checkpoints. To learn how to do this, please refer to the following How To article.


    If you need to obtain an image of the cursor, you can use the approach I described in my previous post. In this case, TestComplete captures the specified region during the playback, and if the mouse cursor is located under the captured window at this moment, the cursor is captured with the region. If you have any problems implementing this approach, please provide me with details.

     

    Thanks.

  • jaggu_009's avatar
    jaggu_009
    Occasional Contributor
    hi Dhanalakshmi,

     By enabling the mouse include option True, you can get the image along with the mouse poiner through region check points.



    IncludeMouse=true;

    Regions.FindDialog_png.Check(Aliases.MyApp.dlgFind, false, IncludeMouse);



    You can follow the below link for more information. This may be useful.



    http://support.smartbear.com/viewarticle/29172/



    Thanks

    Jagadeesh