Hal Fulton wrote: > UI is often hard, especially GUI. > > But I ran into an idea the other day that I was unfamiliar with. > > 'Expect' is sometimes used to wrap a GUI around a text interface -- > spawn the process and interact with it. > > Of course, that in itself is non-trivial perhaps. > > But a text interface is easier to test, especially with Expect. I've been using Ruby at my current job to test a web app via Internet Explorer with the clIEController [0]. The downside is it only scripts IE, and (to the best of my knowledge), you cannot get to the raw markup returned to the scripted browser, so it doesn't help you verify, for example, that each page is rendered as you expect. I've hacked some code for the controller that walks the IE HTML node tree and emits proper XML (not actual XHTML, though) so that one can run xpath calls, via REXML, against the markup to see that certain data is on the page, or check that a page fetch didn't return an error page. If nothing else, it saves *much* time clicking through pages, filling in forms, clicking submit, etc. My test script will spawn a score of threads; browsers pop up all over the place, and I test a dozen pages/site paths at a time. James [0] http://www.clabs.org/wtr/index.cgi?page=/ClIEController