TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Scriptable command line browser?

17 pointsby adatta02over 15 years ago
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.<p>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.<p>Anyone know anything better?

11 comments

macemonetaover 15 years ago
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:<p><a href="http://www.lynxbrowser.com/" rel="nofollow">http://www.lynxbrowser.com/</a>
cschneidover 15 years ago
Something I've looked at: <a href="http://htmlunit.sourceforge.net/" rel="nofollow">http://htmlunit.sourceforge.net/</a><p>Also, I'm not sure how they do it, but Jaxer (<a href="http://www.jaxer.org/" rel="nofollow">http://www.jaxer.org/</a>) has a headless firefox instance they use. Maybe do it in a similar manner?
评论 #943576 未加载
评论 #943439 未加载
评论 #943594 未加载
jamesbrittover 15 years ago
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.<p>If the site in question has scripting you're out of luck, but otherwise it should be quite useful.<p>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.<p><a href="http://github.com/dbrady/tourbus" rel="nofollow">http://github.com/dbrady/tourbus</a>
agazsoover 15 years ago
If all you want is server side automation, then you can try Xvfb, which is a virtual X server capable of running X applications.<p>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 <a href="http://watir.com" rel="nofollow">http://watir.com</a>.
coffeeover 15 years ago
If into Ruby, I saw a presentation on how to do what your looking for, check out: <a href="http://jjinux.blogspot.com/2009/10/ruby-introduction-to-behavioral-driven.html" rel="nofollow">http://jjinux.blogspot.com/2009/10/ruby-introduction-to-beha...</a> - Should be a good starting point...
vithlaniover 15 years ago
Please take a look at Chickenfoot<p><a href="http://groups.csail.mit.edu/uid/chickenfoot/index.php" rel="nofollow">http://groups.csail.mit.edu/uid/chickenfoot/index.php</a><p>maybe it does what you want? I was very impressed with a video I had seen about it a couple of years ago.
flashingpumpkinover 15 years ago
I think Twill might suit you. Have a look at the example. <a href="http://twill.idyll.org/examples.html" rel="nofollow">http://twill.idyll.org/examples.html</a>
rudinover 15 years ago
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.
Shamiqover 15 years ago
Wait, so Selenium RC not hitting the spot for you?
评论 #943395 未加载
voradorover 15 years ago
Have you considered using script(1) ?
leifover 15 years ago
uzbl is interesting, but I don't think it's exactly what you're looking for