摘要: 函数名称 说明 示例 * ... 阅读全文
posted @ 2008-08-25 15:55 赵献良 阅读(1725) 评论(1) 推荐(0) 编辑
摘要: 函数名称 说明 示例 & ... 阅读全文
posted @ 2008-08-25 15:55 赵献良 阅读(1891) 评论(0) 推荐(1) 编辑
摘要: 函数名称 说明 示例 ceil ... 阅读全文
posted @ 2008-08-25 15:54 赵献良 阅读(512) 评论(0) 推荐(0) 编辑
摘要: 函数名称 说明 示例 chr ... 阅读全文
posted @ 2008-08-25 15:53 赵献良 阅读(518) 评论(0) 推荐(0) 编辑
摘要: require 'watir' #必须包含watir check_text = "watir测试框架" #定义局部变量 ie = Watir::IE.new # 打开一个IE浏览器 ie.goto("http://www... 阅读全文
posted @ 2008-08-25 09:22 赵献良 阅读(991) 评论(2) 推荐(0) 编辑
摘要: 1. 基本的ruby语法 1.1 变量、常量和类型 1) 定义变量 变量类型 描述 示例 ... 阅读全文
posted @ 2008-08-18 10:14 赵献良 阅读(1872) 评论(6) 推荐(0) 编辑
摘要: ruby官方网站:http://www.ruby-lang.org/zh_CN/ ruby参考手册: http://www.kuqin.com/rubycndocument/man/index.html watir官方网站:http://wtr.rubyforge.org/ watir API: http://wtr.rubyforge.org/rdoc/ selenium官方网站:http://... 阅读全文
posted @ 2008-08-12 09:44 赵献良 阅读(847) 评论(1) 推荐(0) 编辑
摘要: 加载win32ole文件: require ‘win32ole’ 创建应用对象: excel = WIN32OLE.new("Excel.Application") 新建Excel文件: excel.workbooks.Add #默认Excel文件 excel.workbooks.Add ... 阅读全文
posted @ 2008-08-12 09:42 赵献良 阅读(925) 评论(1) 推荐(0) 编辑
摘要: class CreateFile #定义类,类名首字母需大写 def rows_to_file(rows) #定义类方法 @@data_rows = rows #定义类变量,无需申明变量类型 @@content = '' @@filename = "c:\\filename.txt" #定... 阅读全文
posted @ 2008-08-12 09:41 赵献良 阅读(611) 评论(0) 推荐(0) 编辑
摘要: require 'watir' #定义调用JS的类方法 class Watir::IE def run_script(js) ie.Document.parentWindow.execScript(js) end end ie = Watir::IE.new ie.goto("http://www.google.cn") js_string = "a... 阅读全文
posted @ 2008-08-12 09:39 赵献良 阅读(1890) 评论(3) 推荐(0) 编辑