From: David Vallner Date: 2006-10-22T22:18:45+09:00 Subject: Re: downloading web page as HTML accessed through WATIR --------------enig6BF3527D94378911740CEE77 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable michael wrote: > is there anyway to download the page accessed through WATIR as html > page?? >=20 > for instance, >=20 >=20 > require 'watir' >=20 > ie =3D Watir::IE.start("http://www.yahoo.com") >=20 >=20 > above codes will open www.yahoo.com.. what should we do to download > this page as yahoo.htm?? >=20 > any suggestion or hints will be deeply appreciated.. >=20 >=20 If this is all you need, you might as well use Net:HTTP, or open-uri - this should have smaller overhead since you're not instantiating an IE control. require 'open-uri' open('http://www.yahoo.com/') { |html| open('yahoo.html', 'w') { |out| out.print(html.read) } } David Vallner --------------enig6BF3527D94378911740CEE77 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) iD8DBQFFO2+zy6MhrS8astoRAkUKAJ96rYWkLXiM9KUrLflYhKCZLtVGKgCdFtFu J1DKU0MjpGzSRGjxX8HSEJ0= =5vlt -----END PGP SIGNATURE----- --------------enig6BF3527D94378911740CEE77--