How to capture a screenshot using VBScript in TestComplete?
21,803
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.
Comments
-
Ramakrishna almost 4 years
I'm using TestComplete. I need to capture a screenshot and place it in a particular folder. How to do this using VBScript?
-
Helen over 11 years@YallaRamakrishna: If it worked for you, please mark it as solution answer so other people will know.
-
Ramakrishna over 11 yearsActually i am new user for stack overflow.I really don't know how it will be marked please tell me the procedure.
-
Helen over 11 years@YallaRamakrishna: To mark an answer ac accepted, click on the check mark to the left of the answer: cdn.sstatic.net/img/faq/faq-accept-answer.png
-
nonozor over 5 yearsWhat is "Sys" ? This doesn't worked for me, vbs seems to doesn't recognize it.