title: Browser automation: Python + Firefox using PyXPCOM
body: <p>I have tried <a href="http://pamie.sourceforge.net/" rel="nofollow noreferrer">Pamie</a> a browser automation library for internet explorer. It interfaces IE using COM, pretty neat:</p>
  
  <pre><code>import PAM30
  ie = PAM30.PAMIE("http://user-agent-string.info/")
  ie.clickButton("Analyze my UA")
  </code></pre>
  
  <p>Now I would like to do the same thing using <a href="https://developer.mozilla.org/en/pyxpcom" rel="nofollow noreferrer">PyXPCOM</a> with similar flexibility on Firefox. How can I do this? Can you provide sample code?</p>
  
  <p><strong>update: please only pyxpcom</strong></p>