scripting browsers from Python
Stephen Thorne
stephen.thorne at gmail.com
Thu Jun 2 01:10:33 EDT 2005
On 31 May 2005 00:52:33 -0700, Michele Simionato
<michele.simionato at gmail.com> wrote:
> I would like to know what is available for scripting browsers from
> Python.
> For instance, webbrowser.open let me to perform GET requests, but I
> would like
> to do POST requests too. I don't want to use urllib to emulate a
> browser, I am
> interested in checking that browser X really works as intended with my
> application. Any suggestion?
>
> Michele Simionato
I use pbp, http://pbp.berlios.de/
It's essentially a python commandline webbrowser suitable for testing
websites. It makes it easy to do things like:
go http://user:pass@mywebsite/secure/
follow Admin
follow Configure
formvalue config max_widgets 300
submit config
in a script, and then run that script at your lesuire.
As it's designed for testing, everything you do is essnetial an
assertion, so if anything fails it fails spectacularly with debug
messages and non-zero exit codes. You can also load python code up so
you can do arbitary stuff.
--
Stephen Thorne
Development Engineer
More information about the Python-list
mailing list