If you’re doing Selenium testing with Rails, take a look at my plugin that uses Selenium-RC to directly control the browser and allows you to run Selenium tests just like other tests in Rails. http://svn.viney.net.nz/things/rails/plugins/selenium_jelly
As for your question, you should probably add an id to the tag so that it can be easily identified. Then simply use the Selenium ‘click’ command to simulate a click.
-Jonathan.