--- Titus Brown <[EMAIL PROTECTED]> wrote: > On Tue, Apr 11, 2006 at 11:57:05PM -0400, Martin Blais wrote: > -> Hi > -> > -> I've been fiddling with Selenium recently, and I find it's a lot > of > -> fun to have a recorder for tests. > -> > -> In my current web app setup, I've been using mechanize with a lot > of > -> hand-written tests. Even with all the niceties of mechanize, I > find > -> myself still being a bit lazy on writing tests. > -> > -> Would it not be fun to have some tool to convert the Selenium HTML > -> files recorded with the Firefox plugin into Python twill code or > -> Python mechanize code, to get started on writing new test cases? > -> The resulting code could be improved by hand to produce the final > -> tests and to be run outside the browser without a complicated > setup > -> like what was shown by Titus and Grig at PyCon 2006. > -> > -> This script could be completely independent from Selenium. It > could > -> simply parse the HTML file and output twill source, or mechanize > -> source code. It does not require any complex recorder setup > (that's > -> already taken care of by Selenium). > -> > -> Anyway, has anyone done that for Twill? In other words, has > anyone > -> written a Selenium HTML to Twill code converter? (If not I think > -> I'm about to write one.) > > I haven't seen one, although I've certainly thought about writing > one. > > It would be entertaining to try a complete circle, where you take > Selenium HTML, convert it into twill, and then have a twill-like > language that drives Selenium Remote Control ;). > > --titus >
For Selenium HTML tests -> Python scripts -> back to HTML tests, check out make_selenium.py. It currently only does the last arrow, but in a few days it will do the first too. It should also be possible to write Selenium RC-specific Python scripts that can be then turned by make_selenium.py into HTML. http://joker.linuxstuff.pl/documentation/make_selenium (I've been emailing back and forth with the author, requesting various features such as the Selenium RC stuff and the HTML->Python translation :-) Grig _______________________________________________ twill mailing list [email protected] http://lists.idyll.org/listinfo/twill
