Ask HN: Scriptable command line browser?
Basically what I'm looking to do is use Selenium IDE (http://seleniumhq.org/) on Firefox to generate some regression tests but then I want to replay them without having to fire up X11 and Firefox.
I found ELinks (http://elinks.or.cz) which is a text based browser with Lua support but it seems like it would be a good amount of work to write a Selenium binding.
Anyone know anything better?
Lynx can record a session and play it back, which makes it easy to create tests. The sessions are easily edited too. It's available in the repositories of most Linux distributions, or here:
Something I've looked at: http://htmlunit.sourceforge.net/
Also, I'm not sure how they do it, but Jaxer (http://www.jaxer.org/) has a headless firefox instance they use. Maybe do it in a similar manner?
A tool such as Tourbus might work. It's a Ruby app meant to stress test Web sites. It uses Webrat and (I think) Mechanize underneath, and does not open any browsers.
If the site in question has scripting you're out of luck, but otherwise it should be quite useful.
In fact, I found yourself using both Tourbus and Selenium on a project, and decided I didn't want to have duplicate tests, so I wrote some helper code to allow Tourbus to execute my Selenium scripts. So far, so good. I can record the actions in the Selenium 'IDE' plugin, and use them in Tourbus.
If all you want is server side automation, then you can try Xvfb, which is a virtual X server capable of running X applications.
On a related subject I used Watin (.net) for browser automation and learned, that it was modeled after Watir, which is the same in ruby. See http://watir.com.
If into Ruby, I saw a presentation on how to do what your looking for, check out: http://jjinux.blogspot.com/2009/10/ruby-introduction-to-beha... - Should be a good starting point...
Please take a look at Chickenfoot
http://groups.csail.mit.edu/uid/chickenfoot/index.php
maybe it does what you want? I was very impressed with a video I had seen about it a couple of years ago.
I think Twill might suit you. Have a look at the example. http://twill.idyll.org/examples.html
Maybe give vimperator a try. It is a plugin for firefox that gives it a vim feeling. I think you can write scripts for it too.
Wait, so Selenium RC not hitting the spot for you?
Have you considered using script(1) ?
uzbl is interesting, but I don't think it's exactly what you're looking for