Selenium Testing for Firefox Addon

Is there any way to use Selenium to test a Firefox Addon (written with the SDK)? The part thats escaping me is how to interact with the popup. I can get it to appear via resource://gettalent-firefox/data/popup.html but when I try to login, I get an error. Any advice?

I haven’t ever done it before but there are addons for Firefox that make creating tests pretty simple from what I hear. This is one of those addons:

https://addons.mozilla.org/en-US/firefox/addon/selenium-builder/