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

HtmlImage.Capture grabbing part of header

1 Answer 51 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 25 Apr 2012, 06:24 PM
I'm trying to verify images in a web app, and I notice that HtmlImage.Capture does a screen grab. If the image, once I scroll it into view, is partially obsured by a floating header we have, then the Capture() call will return part of that header.

Is there a better way to grab the image? Also, we'd like to run this on a build server too, where there is not necessarily an interactive user.

Do I need to download the image directly using the value in the SRC tag?


1 Answer, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 30 Apr 2012, 08:32 PM
Hello John,

The Capture method returns a Bitmap of the HtmlImage control, and can be affected by browser scrolling and interfering elements, as you've experienced.

Downloading the image directly from the SRC tag is probably the best way to reliably retrieve the full, unobstructed image. This is also a better option for your remote execution, where certain types of actions won't work on a Locked or Non-Interactive machine.

Regards,
Anthony
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
John
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Share this question
or