#encoding: UTF-8 #添加这一行才可以处理中文
require 'rubygems' #gem install xxx --no-ri --no-rdoc
require 'watir-webdriver'
b= Watir::Browser.new(:firefox, {:profile => 'default'})
b.goto "http://mail.163.com/"
b.text_field(:name, "username").clear
b.text_field(:name, "username").set("your_username")
b.text_field(:name, "password").set("your_password")
b.button(:type, "submit").click
sleep(3)
Comments !