Ask a Question

How to compare images?

New Contributor

How to compare images?

with the TestLeft-syp I got the object:


  IDriver driver = new LocalDriver();

  IControl image = driver.Find<IProcess>(new ProcessPattern()
            }, 5).Find<IControl>(new WPFPattern()
                ClrFullClassName = "System.Windows.Controls.ItemsControl"
            }, 3).Find<IControl>(new WPFPattern()
                ClrFullClassName = "System.Windows.Controls.ContentPresenter",
                WPFControlOrdinalNo = 1
            }).Find<IControl>(new WPFPattern()
                WPFControlName = "Image"
            }, 4);
            // Image from TestLeft
            Image actuell_Picture = image.Picture();

  // picture to compare with actuell_Picture 
  BitmapImage expe33 = new BitmapImage(new Uri(@"C:\\expectedPicture.bmp"));
  Bitmap exp44 = new Bitmap(@"C:\\expectedPicture.bmp");


 How to compare this actuell_Picture with a stored picture?
I search in stackoverflow for comparing with BitmapImage, Bitmap,...  No one works for me


TestLeft doesn't include an image comparison function, so you would need to import and use some sort of image comparison toolkit, for example this Simple Image Comparison toolkit for .NET  . I should point out that SmartBear do not support 3rd party applications or toolkits, but you may get help from their respective communities. 

Showing results for 
Search instead for 
Did you mean: