Bret Pettichord posted this at wtr-general few days ago.

If you have a link that looks like this:

<a href="#" onclick="new Ajax.Request('/data_entry/ajax_add_term/131?contract_id=227', {asynchronous:true, evalScripts:true}); return false;">add a term</a>

you can click it using:

browser.link(:html, /contract_id=227/).click