Forum Discussion
7 Replies
- AlexKaras
Champion Level 2
Hi,
.PagePicture() method of page object makes a screenshot of the whole web page. All onscreen objects have .Picture() method provided by TestComplete.
http://support.smartbear.com/testcomplete/docs/reference/program-objects/picture/index.html for more details.
- shankar_rCommunity Hero
Hi,
For posting the picture into your Test Complete Log you can try below link.
https://support.smartbear.com/testcomplete/docs/testing-with/log/posting/images.html
If you want to save it into local machine,
https://support.smartbear.com/testcomplete/docs/reference/program-objects/picture/savetofile.html
- ManojrsrContributor
- shankar_rCommunity 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); }
- ManojrsrContributor