Capturing an object in runtime using TestComplete
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2011
05:57 PM
12-16-2011
05:57 PM
Capturing an object in runtime using TestComplete
Is there a way to capture and store an object (SCREEN CAPTURE) in runtime?
If yes, please let me know how to do that using JScript in detail.
Thanks
If yes, please let me know how to do that using JScript in detail.
Thanks
2 REPLIES 2
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2011
06:17 PM
12-18-2011
06:17 PM
Hi,
If you would like to capture the image of the screen at run time, you can use the Desktop.Picture method. For example, the following script code demonstrates how to capture the screen picture and insert it into the test log:
function TestProc()
{
var w = Sys.Desktop.Picture();
Log.Picture(w, "Screen Image");
}
I’m not a member of the SmartBear Support Team, I’m just helping users in this community. Any views or opinions expressed do not necessarily represent those of SmartBear Software.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2017
04:49 AM
06-21-2017
04:49 AM
#Capture only the desired object or clip you want
obj = obj.Picture()
Log.Picture(obj, "my_image")
obj.SaveToFile("D:\\DATA\\my_image.png")
