Forum Discussion

sps678's avatar
sps678
Frequent Visitor
9 years ago

Take a screenshoot by coordinates

Hello! I need to take some screenshoot by coordinates in desktop application. How can I do it? I'm beginner in TestComplete :)

2 Replies

    • djadhav's avatar
      djadhav
      Regular Contributor

      I have frequently used the PagePicture method effectively. Although it does not use coordinates, but takes shots of a particular application.

       

      example:

       

      PUBLIC FUNCTION LogPagePicture(ByVal picName)
          DIM src_Path, dest_Path
          src_Path = Log.Picture(Sys.Browser("*").Page("*").PagePicture,"Application Picture")
          dest_Path = Project.Variables.WORKING_FOLDER_PATH & "\" picName & ".png"
          'Copy file from src_Path to dest_Path                                                   
          Log.Message(dest_Path)
        END FUNCTION