From: James Britt Date: 2005-12-03T05:14:44+09:00 Subject: Re: Screen scraping via regex vs. htmltools (vs. REXML) itsme213 wrote: > "James Britt" wrote in message > > >>This is what I use to construct the product pages for rubystuff.com from > > > Any chance you could make that code available? Sounds like a useful example. > > Is Mechanize also a good option for writing acceptance tests, compared to > Watir? > WATIR exposes the HTML DOM as seen by IE, which is not the raw HTML source returned from the server (but perhaps someone more up on the latest WATIR knows otherwise). Mechanize will get you the source HTML, albeit sanitized for REXML parsing. I find WATIR most useful for walking though a series of pages where automated typing and clicking is essential. Pretty much every Web app I've written in the last 9 months uses WATIR (plus my own custom DSL on top of it) for functional testing. Major time saver. I use Mechanize for data snarfing and occasional feed building. James Britt -- http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools