ruby watir学习三

安装watir:
gem update –system
gem install watir
gem install watir-webdriver

例子:
require "watir"
require 'watir-classic'

test_site = "http://www.baidu.com/"
Search_name = "watir"
ie = Watir::Brower.new
ie.goto test_site
ie.text_field(:name, "wd").set Search_name
ie.button(:type, "submit").click
#ie.close

其他的内容还很多,但是基本的架子已搞起,可以开始了

网上找到的:
http://www.17test.info/elements/

你可能感兴趣的:(开发测试,测试,ruby)