I'm happy to see this being updated. I had run into most of the issues you
mentioned with it (segfaults, incompatibility due to DL's incompatibility),
and ended up writing my own version, adapted from win32screenshot and some
other sources.

http://github.com/vapir/vapir/blob/master/vapir-common/lib/vapir-common/win_window.rb

see methods capture_to_bmp_file, capture_to_bmp_blob, and
capture_to_bmp_structs.

-Ethan

On Thu, May 27, 2010 at 16:23, Jarmo Pertman <[email protected]> wrote:

> Hello.
>
> I'm thinking that here are probably some people who would like to take
> screenshots in their tests so i'll write about Win32::Screenshot in
> here also.
>
> I've taken over a gem called win32screenshot from Aslak Hellesøy and
> released a new version of it after 3+ years.
>
> Since this new version 0.0.4 has a lot of bug fixes and refactorings,
> then it's name is "A Complete Overhaul".
>
> http://github.com/jarmo/win32screenshot (see README for usage
> examples)
>
> gem install win32screenshot
>
> = 0.0.4 2010-05-27 - A Complete Overhaul
> * Fixed a bug where taking of screenshots failed on some sizes of
> windows (thanks for the tip from Tony Popiel)
> * Blocks should be used when taking screenshots for cleaning up
> resources after usage (Aslak Hellesøy)
> * Changed library structure - it is now needed to require
> 'win32/screenshot' (Aslak Hellesøy)
> * Replaced Ruby::DL with Ruby-FFI for better VM support and less
> segfaults (Jarmo Pertman)
> * Added Ruby 1.9.1 support (Jarmo Pertman)
> * Win32::Screenshot.window restores window if it's minimized before
> taking screenshots and brings it to the foreground (Jarmo Pertman)
> * Changed some internal method names (Jarmo Pertman)
> * Replaced Test::Unit with RSpec and made specs more robust (Jarmo
> Pertman)
>
> PS! This version is not backwards compatible due to different method
> names and usage, but upgrading should be relatively easy nevertheless.
>
> Jarmo
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> You received this message because you are subscribed to
> http://groups.google.com/group/watir-general
> To post: [email protected]
> To unsubscribe: 
> [email protected]<watir-general%[email protected]>
>

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: [email protected]
To unsubscribe: [email protected]

Reply via email to