I have tried Pamie a browser automation library for internet explorer. It interfaces IE using COM, pretty neat:
import PAM30
ie = PAM30.PAMIE("http://user-agent-string.info/")
ie.clickButton("Analyze my UA")
Now I would like to do the same thing using PyXPCOM with similar flexibility on Firefox. How can I do this? Can you provide sample code?
update: please only pyxpcom
I've used webdriver with firefox. I was very pleased with it.
As for the code examples, this will get you started.
My understanding of PyXPCOM is that it's meant to let you create and access XPCOM components, not control existing ones. You may not be able to do this using PyXPCOM at all, per Mark Hammond, the original author:
It simply isn't what XPCOM is trying to do. I'm not sure if Mozilla/Firefox now has or is developing a COM or any other "automation" mechanism.
and:
If by "automating", you mean "controlling Mozilla via a remote process via xpcom", then as far as I know, that is not possible
You may instead want to take a look at the previously-suggested Webdriver project, Windmill, or MozMill, both of which support automating Firefox/Gecko/XULRunner via Python.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With