Mechanize did'nt supports javascript, but you can add a search field to the form to specify a search term for it and submit the form using mechanize
form = page.forms.first
form.add_field! "Field_name here","BotM$ucUser$ucUser2Col$cmdLogin"
page = form.submit
source
share