[Wtr-general] screenshots
Cain, Mark
Mark_Cain at RL.gov
Mon Oct 23 10:24:58 EDT 2006
Take a look at the screen capture module in the watir/screen_capture.rb.
it should be able to do what you are asking...
--Mark
-----Original Message-----
From: wtr-general-bounces at rubyforge.org
[mailto:wtr-general-bounces at rubyforge.org] On Behalf Of Phlip
Sent: Saturday, October 21, 2006 8:12 AM
To: wtr-general at rubyforge.org
Subject: [Wtr-general] screenshots
Watirists:
I want to take a picture of a web page in its tested state.
(I'm setting up an acceptance test rig with MiniRubyWiki and
RSpec_Watir, and MRW can display a gallery of screen captures. If I
can record them!)
The options are:
- display the browser, and use Snaggit or a similar
screen capture program to record the browser,
toolbars and all
- The above, but an option in Snaggit to get the
client window only. This is risky if I have other
windows up!
- use @browser.getHTML, save a file, and use
IExtractImage->Extract() to convert the _file_
to PNG
The problem with the first two is they are fragile and slow, and I
could capture the wrong thing. Chronically. The problem with the last
one is I'm converting a file, not the Internet Explorer's DOM in its
exact visual state. I want to look for things like the keyboard focus,
position of dynamic elements, etc.
Now what am I missing? Can I get the HWND from @browser, then copy its
GDI display context?
--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!
_______________________________________________
Wtr-general mailing list
Wtr-general at rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
More information about the Wtr-general
mailing list