如何在 TestComplete 中使用 VBScript 捕获屏幕截图? [英] How to capture a screenshot using VBScript in TestComplete?

查看:57
本文介绍了如何在 TestComplete 中使用 VBScript 捕获屏幕截图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 TestComplete.我需要捕获屏幕截图并将其放在特定文件夹中.如何使用 VBScript 做到这一点?

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

推荐答案

要捕获桌面屏幕截图,请使用 Sys.Desktop.Picture 方法.要将生成的图像保存到文件中,请使用其 SaveToFile 方法:

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"

或者,您可以打开 Test Visualizer 以自动捕获测试操作的屏幕截图.

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

这篇关于如何在 TestComplete 中使用 VBScript 捕获屏幕截图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆