Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

Possible Bug with LogScreenshot


I have a problem with LogScreenshot. When you have an over lap of two window and you call LogScrenshot with handle of overlapped window, you don’t see only the owener of handle but also a portion of the window that overlap the owener of handle.

Giuesppe Monteleone


Hello Giuseppe,

This is a known limitation of the LogScreenshot method. We take the screenshot by calculating the window position and size and getting the bitmap from the Desktop device context. As far as I know, this is the only safe way to take a screenshot of a window under Windows (getting the device context of the window instead of the desktop doesn’t help).