Using send_keys("^a^c") works fine for selecting an entire page as long
as the focus isn't on a control like a textbox or button. But I want to
select and copy a cell in a table -- including it's formatting -- so I
can paste it into Word (or something).
This may seem like an academic exercise, but I see some merit in being
able to do this sort of thing to capture what is actually being
displayed in the browser for troubleshooting purposes. The
screen_capture method is fine for capturing the visible window, but
oftentimes the data you need goes beyond what's visible.
Thanks,
Darrel Boyt
Systems Analyst
Anteon Corporation
Montgomery, Alabama
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of "Michael Bolton"
<[EMAIL PROTECTED]>
Sent: January 17, 2006 8:33 PM
To: WATIR mailing list
Subject: Re: [Wtr-general] Selecting a table cell
This is how it looks to me:
Watir contains a Table object, whose [n](where n is an index) returns a
row, whose [n](where n is an index) returns the cell in the nth column.
Then you can use clip.rb (at
http://segment7.net/projects/ruby/snippets/clip.rb) or something of its
ilk to copy the data to the clipboard.
HTH,
---Michael B.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Boyt, Darrel
Sent: January 17, 2006 4:21 PM
To: WATIR mailing list
Subject: [Wtr-general] Selecting a table cell
I want to select a cell in a table and copy it to the clipboard. I know
I can use send_keys("^a^c") to have AutoItX select an entire page and
copy it to the Windows clipboard, but I want just one cell in a table
copied. Any idea how to do this????
Thanks,
Darrel Boyt
Systems Analyst
Anteon Corporation
Montgomery, Alabama
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general