How to compare images?
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2023
01:43 AM
05-16-2023
01:43 AM
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
Solved! Go to Solution.
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2023
08:35 AM
05-16-2023
08:35 AM
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.
