Forum Discussion

Hardy's avatar
Hardy
Occasional Contributor
7 years ago
Solved

how to specify the screenshot's name?

Used "Post Screenshot" to capture a screenshot After executed the case, it will generate the log and screenshot, we notice that the screenshot's name default as "Picture 1/2/3", can we specify the ...
  • tristaanogre's avatar
    7 years ago

    Not using the Post Screenshot method.  This is not intended to capture a screenshot and name it as a file, it is simply an operation to put a screenshot into the TestComplete test log.  By default, each picture in the log is named, simply, Picture1, 2, 3, etc.

     

    In order to save the image with a particular name, you would call the "Picture" method of the onscreen object desired and then call the SaveToFile method from that... something like

     

    Aliases.MyApp.MyObject.Picture().SaveToFile('MyPictureFile.JPG')