[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Alternative to WebUnit

Eric Lin

1/20/2008 12:01:00 AM

[Note: parts of this message were removed to make it a legal post.]

I'm writing a screen scraping application and looking for Ruby equivalents
of HttpUnit or HttpClient; something that simulates a web browser and
maintains cookies. I've taken a look at WebUnit, but it seems to be poorly
documented and no longer maintained. Is there anything else out there I
might have missed?
Eric

4 Answers

Curt Sampson

1/20/2008 6:32:00 AM

0

On 2008-01-20 09:00 +0900 (Sun), Eric Lin wrote:

> I'm writing a screen scraping application and looking for Ruby
> equivalents of HttpUnit or HttpClient; something that simulates a web
> browser and maintains cookies.... Is there anything else out there I
> might have missed?

test-httpweb. There's a rubyforge project for it:

http://rubyforge.org/projects/tes...

but I've not touched that in a while, so it may be slightly stale. The
most recent version (which is probably not all that different) is in the
src subdir of QAM:

http://www.starling-so.../e...

In particular, you might find the QAM server stuff helpful; everything
you need for starting up one or more servers (web or otherwise), running
tests against them (using test-httpweb or anything else) and then
tearing it all down again at the end, as well as the scripts you'd use
for starting and stopping staging and production servers, is all there.
A quick look at the tutorial might give you an idea of what's going on
there, or just write me if you have questions.

cjs
--
Curt Sampson <cjs@starling-software.com> +81 90 7737 2974
Mobile sites and software consulting: http://www.starling-so...

fedzor

1/20/2008 10:07:00 PM

0



> On 2008-01-20 09:00 +0900 (Sun), Eric Lin wrote:
>
>> I'm writing a screen scraping application and looking for Ruby
>> equivalents of HttpUnit or HttpClient; something that simulates a web
>> browser and maintains cookies.... Is there anything else out there I
>> might have missed?
>

I think waitr is what you're looking for.

Phlip

1/21/2008 3:41:00 AM

0

fedzor wrote:

>>> I'm writing a screen scraping application and looking for Ruby
>>> equivalents of HttpUnit or HttpClient; something that simulates a web
>>> browser and maintains cookies.... Is there anything else out there I
>>> might have missed?

> I think waitr is what you're looking for.

Watir has drawbacks and benefits...

- it only works on Windows, where it drives Internet
explorer thru ActiveX Automation
- it will be supremely slow, and a little fragile
- it will do many things you don't need, such as
download every image, launch every Flash app,
and have its way with your OS

however

- Watir is extraordinarily well documented and featurized

HttpUnit is the closest thing I know (possibly including Mechanize) which
simulates a browser at the protocol level.

--
Phlip
http://www.oreilly.com/catalog/9780...
^ assert_xpath
http://tinyurl.... <-- assert_raise_message

Eric Lin

1/23/2008 12:25:00 AM

0

[Note: parts of this message were removed to make it a legal post.]

Actually I did a bit of research and found WWW::Mechanize (thought it was
for Perl only) and scRUBYt, which served my needs quite well. But thanks
for the need anyways, I'll look into them!

On Jan 20, 2008 2:07 PM, fedzor <fedzor@gmail.com> wrote:

>
>
> > On 2008-01-20 09:00 +0900 (Sun), Eric Lin wrote:
> >
> >> I'm writing a screen scraping application and looking for Ruby
> >> equivalents of HttpUnit or HttpClient; something that simulates a web
> >> browser and maintains cookies.... Is there anything else out there I
> >> might have missed?
> >
>
> I think waitr is what you're looking for.
>
>