您好我想知道在描述性编程中是否可以进行位图检查点,因为我在多个页面中处理相同的图像
答案 0 :(得分:2)
'Test Code
SystemUtil.CloseProcessByWndTitle("HPE MyFlight Sample Application")
SystemUtil.Run "C:\Program Files (x86)\HP\Unified Functional Testing\samples\Flights Application\FlightsGUI.exe"
Window("regexpwndtitle:=HPE MyFlight Sample Application").WaitProperty "visible",True
Window("regexpwndtitle:=HPE MyFlight Sample Application").CaptureBitmap "C:\Expected.bmp",True
Window("regexpwndtitle:=HPE MyFlight Sample Application").CaptureBitmap "C:\Actual.bmp",True
Msgbox CompareBitMapFiles("C:\Actual.bmp","C:\Expected.bmp")
Public Function CompareBitMapFiles(ByVal ExpectedImage,ByVal ActualImage)
Dim objFileCompare
Dim blnIsEqual
Dim strFileComparisonValue : strFileComparisonValue = "Not Equal"
Set objFileCompare = CreateObject("Mercury.FileCompare")
blnIsEqual = objFileCompare.IsEqualBin(ExpectedImage,ActualImage,0,1)
If blnIsEqual Then
strFileComparisonValue = "Equal"
End If
CompareBitMapFiles = strFileComparisonValue
End Function
另一个命令行工具是here
答案 1 :(得分:1)
HP UFT 12.5版,标准检查点功能包括检查位图的功能:
official HP help xenter for Checkpoints