Hardy
8 years agoOccasional Contributor
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 screenshot name like this: Case no.1 - Customer, Case no.2 - Contract. Pls refer to the attached screenshot for more detail.
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')