I was thinking about doing scrolls, but I can't seem to find a scroll / page height that I can use to calculate how far and how many times I need to scroll so I can stitch together an image. Is it possible to get such information?
9 Answers, 1 is accepted
Yes, you can capture the entire window or a targeted portion of that window using the Window.GetBitmap() method. Please follow this article for more information. Unfortunately we can only capture what is currently visible. We do not have a method in which you can capture the entire contents of the web page, scrolling along the way.
the Telerik team
Thanks in advance..
You can capture an image of the browser at any point in the test and save that image to the hard drive. Here's how it looks in code:
Some other ways of capturing the browser state are listed in the replies above as we as this article. Kind regards,
the Telerik team
I got the same issue by cant go over it
Please be more specific on what exactly you are experiencing. This thread was updated last year and it seems the last response solved the problem.
Please refer to the code provided in the previous post and give it a try, it is quite straight forward and it should work without any issues.
I'm getting following error if i use the above give code for screenshots in telerik, Can anyone please help me
System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+. at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams) at System.Drawing.Image.Save(String filename, ImageFormat format)
when i googled about this error, it says the issue is with the folder access , but i checked there are no access issues with the directory,
This code works correctly on my side and it capture an image without issues. See that video.
Could you please try changing the folder or run Test Studio as Administrator?
Hope to hear from you soon.
Telerik by Progress