|
5#
楼主 |
发表于 2011-5-19 14:02:20
|
只看该作者
回复 3# iQuickTest
具体函数如下:
Function ErrorCapture(CaptureObj)
'create the screen capture object
Set oScreenCapture = CreateObject("KnowledgeInbox.ScreenCapture")
' 获取存放截图的路径
Dir=Environment("ProjectDir")&"错误截图\"&Environment("PageNum")&".jpg"
'Capture the active window
hwnd= CaptureObj.GetROProperty( "hwnd" )
'Capture the web page with vertical and horizontal scroll enabled
Set oIE=oScreenCapture.GetIEObjectFromProperty("hwnd",hwnd)
call oScreenCapture.CaptureIE (oIE.HWND,Dir,"Scrolling Capture",True,True)
'oScreenCapture.CaptureIE hwnd,Dir,"",True,True
Environment("PageNum")=Environment("PageNum")+1
ErrorCapture=Dr
'Destroy the object
Set oScreenCapture = Nothing
End Function |
|