Forum Discussion
shankar_r
9 years agoCommunity Hero
You are not storing the picture, you are just creating file name.
Try below code,
function CapturePictures()
{
// Saves screenshot into your local
Sys.Desktop.ActiveWindow().Picture().SaveToFile("D:\\Users\\Desktop\\test.png")
var PicObj = Utils.Picture;
// Loads an image from a file
PicObj.LoadFromFile("D:\\Users\\Desktop\\test.png");
// Saves this image to the test log
Log.Picture(PicObj);
}
Manojrsr
9 years agoContributor
Hi,
Thanks for Information, I have tried and implemented
Log.Picture() is executed, while clicking on "HasPicture" column in test log, Picture is not opened.
But its saved in given File Path.Can you explain above clarification
- AlexKaras9 years agoCommunity Hero
Hi,
The picture should be displayed in the Picture tab that should be along with Call Stack, Additional Info and others. For some reason it is hidden in your instance of TestComplete (most probably, you undocked it and closed).
Try to execute the View | Desktop | Restore Default Docking main menu command and check if the Picture tab is back.
- shankar_r9 years agoCommunity Hero
You can do like below too,