Offhand, I'm not sure how to do it, but it certainly seems like it should be doable. However, I think there is going to be some roadblocks if you are using Firefox.
Automator depends on actions to interact with specific applications, because it is meant to automate the tasks of those specific applications. So, that means it would be best to have Automator actions made for use with Firefox, and such actions would typically come from the developers of Firefox. I don't think this has happened yet.
Usually, the actions are included within the application and Automator will automatically know about them. However, sometimes developers will release actions that can be installed afterwards, so if you don't see actions in Automator for Firefox then you should check with Firefox's developers just in case.
If the developers for Firefox have not written any Automator actions yet, then the second thing to look for is AppleScript. Application developers for Mac programs are expected to make their applications scriptable with AppleScript. However, once again, I doubt the developers of Firefox have done this either, but you could check with them just in case. My doubts don't mean much since I don't currently use Firefox, but I have not known Firefox to ever be well integrated with Mac OS X like a Mac application should be.
You can open Script Editor in the AppleScript folder of the Applications folder. (Just use the Spotlight search field in the upper right corner of the menu bar, and type the name Script Editor, and note that it's two words.) Then you can try to open Firefox's AppleScript dictionary from its File menu. If Firefox isn't listed in the window that is presented, you can select the "Browse…" button in the lower left corner of the window and find it that way. However, in that case, it'll probably tell it isn't scriptable, but it's worth a try anyways.
Failing those two options, Safari does have Automator actions written for it, and Safari is scriptable with AppleScript. So, you might end up using Safari to do your daily browsing if you do find a solution to this. Either that, or maybe the developers of Firefox will be inspired to make their browser into a real Mac application by making it more accessible to automation. That won't happen if nobody encourages them, so consider contacting Firefox's developers and putting in a request for automation on the Mac, and in what kind of tasks you'd like to do.
Even if it does turn out that they are working on it, tell them anyways so they know someone else is interested in it. Either way, you may end up using a solution with Safari in the mean time. If for some reason you don't like using Safari, you might consider looking into other web browsers written for the Mac that take their development for the Mac more seriously if it turns out Firefox's developers are not. Good luck. 🙂