急怎么写一段ruby程序,实现表单的自动登入

急!如何写一段ruby程序,实现表单的自动登入?
比如,网页上有个表单,需要输入用户名和密码后,用鼠标点击“登录”即可。那现在不是用鼠标点击它,就想用ruby程序去自动“登录”,如何实现?谢谢!!

------解决方案--------------------
using curl in ruby.

or doing like this

[code=RUBY]require 'net/http'
source = Net::HTTP.get('stackoverflow.com', '/index.html')
[/code]