Last week the Capybara project released version 0.4. Since the 0.3.9 release, which added support for third-party drivers, I’ve been working on turning Terminus into fully compatible driver for it. It’s still an experiment but it’s in the sort of semi-useful state that means I’m okay throwing it out to see if anyone’s interested in it.
So what is it? Terminus is a Capybara driver where most of the driver functions
machine using the Capybara API, without any browser plugins or extensions. ‘Any
browser’ really means ‘any browser that supports the
API’ for now, so you can’t use IE, but the ‘any machine’ part is true: any
browser that can see your development machine can be controlled using Terminus,
including any phone, iPad or desktop machine on your local network.
- A few selectors and HTML5 features in the specs don’t work due to browser inconsistencies.
- Redirects work but infinite redirection cannot be detected.
The original intention was for Terminus to be a tool for automating
cross-browser testing, so the lack of IE support is kind of a problem. I
actually went some way towards fixing this; I wrote a pretty stupid
document.evaluate() replacement called Pathology, and to support that a
PEG parser compiler called Canopy so I could write a declarative XPath
grammar. Unfortunately these don’t yet perform well enough to support the
workload that Capybara throws at a browser.
I also want to add an API for switching browsers based on vendor and OS versions, but this release is just enough to support the required Capybara API.
You can find out more on the project’s GitHub page, and installation is the
gem install terminus command – I’d love if a few of you could kick its
tyres a bit and figure out if it’s actually useful for anything.