Automate Mozilla Firefox

Paul Boddie paul at boddie.org.uk
Wed Jul 26 17:20:28 EDT 2006


bruce wrote:
>

[Quoting "david"...]

> > I am trying to automate navigating to urls (all from a txt file) 1 at a time
> > in Firefox and then killing firefox before navigating to the next. I think I
> > might have to use PyXPCOM to do this but I have never used this package and
> > cannot find any good resources on the net to help me along. Anyone have an
> > idea as to how I would do this or have any good resources they could point
> > me to?

> just what are you trying to do... are you trying to drive some functionality
> of firefox? are you trying to parse web files??

There are some plausible reasons for automating browsers rather than
writing a script to download, parse, interpret, submit, and so on, not
limited to things like getting good visual feedback, access to
in-browser features that may be necessary to successfully access or
interpret content, avoiding issues with server-side browser checks
(possibly not limited to mere "user agent" testing), and a hopefully
intuitive and sufficient model of the page to get and to produce the
right information.

> more information might allow someone to shed additional thoughts on a
> solution..

Well, PyXPCOM didn't support out-of-process automation last time I
checked, and I haven't read anything on the PyXPCOM list [1] that would
suggest otherwise. Meanwhile, there is support for automation of
browsers like Internet Explorer and Konqueror [2] which may or may not
be good enough for the questioner's needs, although the latter requires
some non-standard components before it works, unfortunately.

Paul

[1] http://listserv.activestate.com/mailman/listinfo/pyxpcom
[2] http://www.boddie.org.uk/python/qtxmldom.html
    http://www.boddie.org.uk/python/kpartplugins.html




More information about the Python-list mailing list