微笑,关怀。。。
qtp学习笔记-----截图函数
上一篇 /
下一篇 2010-01-05 15:09:36
/ 个人分类:qtp
function CutPic(name)
Set bjQTP=getobject("","quicktest.application")
bjQTP.windowstate="Minimized"
Set bjQTP=nothing
Desktop.CaptureBitmap GetPath(name),true
end function
function GetPath(name)
dim dateFolder,fileAddress
Set fso=createobject("scripting.FileSystemObject")
dateFolder=CStr(split(Date,"-")(0) & split(Date,"-")(1)& split(Date,"-")(2))
if(fso.folderexists(Environment("LogDir")+dateFolder)) then
fileAddress=Environment("LogDir") & dateFolder & "\" & name &CStr(split(time,":")(0) & split(time,":")(1)& split(time,":")(2)) &".bmp"
else
fileAddress="d:\default.bmp"
end if
GetPath=fileAddress
set fso=nothing
end function
收藏
举报
TAG: