My test environment is Win 7 Enterprise 64 bit Service Pack 1. Ranorex version 5.4.6.
I am trying to validate an image but it is failing to validate. The code is;
void ITestModule.Run() { Mouse.DefaultMoveTime = 300; Keyboard.DefaultKeyPressTime = 100; Delay.SpeedFactor = 1.0; Init(); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'Window1' at CenterRight.", repo.Window1.SelfInfo, new RecordItemIndex(0)); repo.Window1.Self.Click("CenterRight"); Delay.Milliseconds(0); Report.Log(ReportLevel.Info, "Validation", "Validating ContainsImage (Screenshot: 'Screenshot4' with region {X=705,Y=240,Width=194,Height=194}) on item 'Window1.DdDisplayPanel'.", repo.Window1.DdDisplayPanelInfo, new RecordItemIndex(1)); Validate.ContainsImage(repo.Window1.DdDisplayPanelInfo, DdDisplayPanel_Screenshot4, DdDisplayPanel_Screenshot4_Options); Delay.Milliseconds(100); }But it fails each time saying that the screen shot does not contain the image. But in the log file, I can clearly see the image in each screen shot.
I edited the settings by going to Settings, Imaging and selected Edges, Edges Sobel, Grayscale and I changed the similarity to 0.99 but these changes didn't seem to make a difference to the validation outcome.
The log file is attached; Thank you.
Edit by Ranorex Support: Formatted Code