Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to capture a screenshot using VBScript in TestComplete?

I'm using TestComplete. I need to capture a screenshot and place it in a particular folder. How to do this using VBScript?

like image 929
Ramakrishna Avatar asked Oct 21 '22 15:10

Ramakrishna


1 Answers

To capture a desktop screenshot, use the Sys.Desktop.Picture method. To save the resulting image to a file, use its SaveToFile method:

Sys.Desktop.Picture.SaveToFile "E:\screenshot.png"

Alternatively, you can turn on the Test Visualizer to automatically capture screenshots for your test actions.

like image 96
Helen Avatar answered Nov 16 '22 17:11

Helen