This is a migrated thread and some comments may be shown as answers.

Coded Test Step - How do I get the bitmap from ArtOfTest.WebAii.Controls.Xaml.Wpf.Image ?

1 Answer 46 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 25 Aug 2016, 01:22 PM

In a coded test, I’m trying to compare an image displayed in a ArtOfTest.WebAii.Controls.Xaml.Wpf.Image control with an image I have on the file system. This would be quite straightforward in WPF, but how do I get the bitmap (either as a byte[] or System.Drawing.Bitmap) from ArtOfTest.WebAii.Controls.Xaml.Wpf.Image control? 

Thanks

1 Answer, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 30 Aug 2016, 08:08 AM
Hello,

There is no API or a way for the WPF testing framework to obtain the real bitmap out of the image source. However you can eventually read the bitmap manually as you do in WPF by obtaining first the image source. See this feedback on the matter. Please note however the API has been updated an year ago so you will need a newer version of the product to use the extension we've added.

I would however look into a different approach - the built-in Image Verification feature in Test Studio. It's a straight-forward image comparison solution which you can give a try as well.

Regards,
Konstantin Petkov
Telerik by Progress
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Chris
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Share this question
or