Automating simple web forms

  • Thread starter Eric Christopherson
  • Start date
E

Eric Christopherson

What would be the best headless web testing/automation library to use,
given that:
1. I want to automate filling in and submitting forms on one web site,
which uses only a little JavaScript.
2. I want something that balances ease of use and stability, and is
reasonably actively maintained
?

I've been playing around with Watir and gotten it to do what I want,
but it involves a live browser; I would like something headless. When
I asked on IRC, I was told Capybara was good -- and it does look good,
but I'm not sure if it has too many moving parts for my purposes.
 
B

Bret Pettichord

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

Have you looked at Celerity?
 
M

Marc Weber

Excerpts from Eric Christopherson's message of Thu Mar 31 04:06:32 +0200 2011:
What would be the best headless web testing/automation library to use,
given that:
1. I want to automate filling in and submitting forms on one web site,
which uses only a little JavaScript.
2. I want something that balances ease of use and stability, and is
reasonably actively maintained
?

The only headless browser supporting JS I know about is HTMLUnit
(written in Java). I remember having seen some libraries providing Ruby
interfaces for it.

If you don't need JS mechanize etc are alternatives.

Marc Weber
 
E

Eric Christopherson

Excerpts from Eric Christopherson's message of Thu Mar 31 04:06:32 +0200 2011:

The only headless browser supporting JS I know about is HTMLUnit
(written in Java). I remember having seen some libraries providing Ruby
interfaces for it.

Yeah, I looked a little at that. Apparently you can use it from within
Selenium and Capybara, and probably others.
If you don't need JS mechanize etc are alternatives.

I just discovered I really don't need JS in this case, so I will try
mechanize. I'd still like to know the best route to go in the future
when I do need JS though.
 
A

Adam Prescott

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

On Fri, Apr 1, 2011 at 1:42 AM, Eric Christopherson <
Yeah, I looked a little at that. Apparently you can use it from within
Selenium and Capybara, and probably others.


I just discovered I really don't need JS in this case, so I will try
mechanize. I'd still like to know the best route to go in the future
when I do need JS though.

There's a non-Ruby headless browser with JavaScript I recently discovered
called PhantomJS: http://www.phantomjs.org/
 
R

Richard Conroy

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

Excerpts from Eric Christopherson's message of Thu Mar 31 04:06:32 +0200
2011:

The only headless browser supporting JS I know about is HTMLUnit
(written in Java). I remember having seen some libraries providing Ruby
interfaces for it.

Celerity.

It is also pretty good, and bloody fast. It also has some nice features wrt
HTTPS and certificates (inherited from the HttpUnit library). The Ruby API
is pretty good - a nice example of how to wrap a Java API with Ruby.

Capybara supports Celerity as a driver, but I think there is talk of
removing it.
 
B

Brian Candler

Eric Christopherson wrote in post #990286:
I just discovered I really don't need JS in this case, so I will try
mechanize.

I suggest you have a look at cucumber too (cukes.info) - this is a sort
of DSL which sits on top. I used it with webrat, but I expect it
supports capybara etc these days, and there are howtos on using it with
watir and so forth.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top