| || |
QTP capturebitmap .PNG image to Clipboard?
I need to take the screenshot at the end of the Test,i am running the test from QCscript from QTP,
the below code is working fine,instead of saving the file to local by hardcoding the drive name (never know the person who executes the script may or may not have the exact drive name)is there any why i can save the capturebitmap to the clipboard and send the clipboard to the QC test case attachment.
SAPGuiSession("Session").SAPGuiWindow("Notificatio n: InfoSpokes").CaptureBitmap "C:\MyTest\Test1.png",True
Set QCConnection = QCUtil.QCConnection
Set treeManager = QCConnection.TreeManager
' Specify the local path to the file.
LocalFilePath = "C:\MyTest\Test1.png "
' Specify the Quality Center path to the desired folder
Screen1 ="Subject\BW Automation\Screen_Shots"
Set node = treeManager.nodebypath(Screen1)
set att = node.attachments
Set atta = att.AddItem(Null)
atta.FileName = LocalFilePath
atta.Type = 1