Controling a browser from outside needs special programs. For firefox,
you can use MozRepl, which I've never tried.
Keysnail lets you bind keys to functions, but I don't know if it's
If you're only interested in automation, i.e., *always* refresh
Teika (Teika kazura)