好吧我知道了!您可以將其保存到每臺機器上存在的臨時文件夾中。然後保存到QC!
Dim oWsh, strTempFolderPath, strFilePathToSave, QCConnection, treeManager
Dim LocalFilePath, Screen1, node, att, atta
Set oWsh = CreateObject("WScript.Shell")
strTempFolderPath = oWsh.ExpandEnvironmentStrings("%Temp%")
strFilePathToSave = strTempFolderPath & "\Test1.png"
browser("title:=.*").page("title:=.*").CaptureBitmap strFilePathToSave,True
Set QCConnection = QCUtil.QCConnection
Set treeManager = QCConnection.TreeManager
' Specify the local path to the file.
LocalFilePath = strFilePathToSave
' Specify the Quality Center path to the desired folder
Screen1 ="Subject\Path to the folder where you want to save it\"
Set node = treeManager.nodebypath(Screen1)
set att = node.attachments
Set atta = att.AddItem(Null)
atta.FileName = LocalFilePath
atta.Type = 1
atta.Post()
Set oWsh = nothing : set QCConnection = nothing : Set treeManager = nothing
Set node = nothing : set att = nothing : set atta = nothing
我的UFT掛在「類型」分配上。任何線索? – thepanuto 2016-02-18 18:43:11