Python translators for mechanize and twill

 
Post new topic   Reply to topic    SpikeSource Forums -> TestGen4Web
View previous topic :: View next topic  
Author Message
mharrison



Joined: 28 Oct 2004
Posts: 12

PostPosted: Mon Dec 05, 2005 10:22 pm    Post subject: Python translators for mechanize and twill Reply with quote

I've started python translators for mechanize and twill. http://wwwsearch.sourceforge.net/mechanize/ allows one to program a web browser from python. http://www.idyll.org/~t/www-tools/twill.html allows one to run simple scripts or type commands in interactively. Both are pretty simple (yet featureful, though no javascript support).

My tg4wTwill.py will generate a twill script when feed the saved tg4w script. The tg4Mechanize.py will run a unittest against the saved tg4w script. Both depend on the parser program which depends on elementtree.

Any other python programmers out there?



tg4wPython.zip
 Description:

Download
 Filename:  tg4wPython.zip
 Filesize:  2.86 KB
 Downloaded:  622 Time(s)

Back to top
View user's profile Send private message
kumar303



Joined: 08 Feb 2006
Posts: 1

PostPosted: Wed Feb 08, 2006 3:18 pm    Post subject: Reply with quote

yes, a python programmer here. This extension is interesting stuff. I had trouble getting assertions to record anything in Firefox. i also got a blank test when I tried the simpletest generator. hmmf. I need to look at the forums more before I bug everyone about that.

But I like the record/playback/xml approach! and... I like twill Smile However, I couldn't get this script to work at first so I made a few minor modifications. See attached. Nothing perfect but this solved some issues I was having where the xpath wasn't getting parsed right. I didn't realize my editor turned all tabs into spaces otherwise I would attach a patch (sorry).



tg4wPython.work.tgz
 Description:

Download
 Filename:  tg4wPython.work.tgz
 Filesize:  3.08 KB
 Downloaded:  643 Time(s)

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SpikeSource Forums -> TestGen4Web All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2002 phpBB Group