Forum Discussion

claudio's avatar
claudio
New Contributor
3 years ago
Solved

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

  • Contact the support team, and ask if you can extend your trial version.