Forum Discussion

testcomplete's avatar
testcomplete
Occasional Contributor
16 years ago

Region Checkpoint not working

We are using region compare checkpoint to compare a specified region in windows based application. We found below mentioned issues


 


When we try to use this checkpoint its working fine for the first couple of attempts but it’s not consistent


(checkpoint failed – “Regions are not same”)


 


we could also see some red colour lines which are differences. Also we tried using tolerance of 10 and transparence to overcome this inconsistent behavior


 


Eg:1


Call Regions.Compare("EvenPageView", Aliases.Printgroove_POD_Ready.HwndSource_CPGRMainWnd.CPGRMainWnd.grManinWindowGrid.dpPageAreaPanel.dockManager.Grid.Grid.gridDocking.zpanel.Grid1.Grid.DockablePane.DockPanel.Border.Grid.cpClientWindowContent.grDocumentPanelGrid.tbcDocumentPanel.grDocumentTabGrid.scvDocumentTree.tvDocDisplay.Picture(39, 43, 87, 230, False), False, False, True, 10)


 


Also we tried using picture.compare


 


Eg:2


a=Aliases.Printgroove_POD_Ready.HwndSource_CPGRMainWnd.CPGRMainWnd.grManinWindowGrid.dpPageAreaPanel.dockManager.Grid.Grid.gridDocking.zpanel.Grid1.Grid.DockablePane.DockPanel.Border.Grid.cpClientWindowContent.grDocumentPanelGrid.tbcDocumentPanel.Picture.SaveToFile("F:\test\even1.PNG")


b="F:\test\even.PNG"


if( Aliases.Printgroove_POD_Ready.HwndSource_CPGRMainWnd.CPGRMainWnd.grManinWindowGrid.dpPageAreaPanel.dockManager.Grid.Grid.gridDocking.zpanel.Grid1.Grid.DockablePane.DockPanel.Border.Grid.cpClientWindowContent.grDocumentPanelGrid.tbcDocumentPanel.Picture.Compare(b,a))then


 Log.message("test pass")


 Else


 Log.Message("test failed")


 end If


 


Is there any alternate to ensure that image verification is consistent for every run. Also let us know if anything to be done at PC configuration level to eliminate this image comparison failure.

1 Reply


  • Hi Amarajothi,





    Please zip your entire project suite folder along with the log of the failed test execution and send us the archive via our Contact Support form (http://www.automatedqa.com/support/message). Make sure that messages in your log correspond to the latest version of your tests. We will try to help you with the comparison.