嗨,我想知道在描述性编程中做位图检查点是否可行,因为我在多个页面中处理相同的图像。
发布于 2017-09-22 05:14:49
'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另一个命令行工具是这里
发布于 2017-09-22 00:41:37
https://stackoverflow.com/questions/46342814
复制相似问题