随笔分类 -  Watir

摘要:Watir简介"Watir" (发音与 water相近) 全写是 "Web Application Testing in Ruby"。Watir是一款用Ruby脚本语言驱动浏览器的自动化测试工具。Wait是基于Web的自动化测试开发的工具箱。Watir对什么有效?Watir可以驱动那些作为Html页面被发送到Web浏览器端的应用程序。Watir对下列组件不起作用:ActiveX、Java Applets、Macromedia Flash或者其他的应用程序插件。判断Watir是否可用的方法:在页面上点击右键-查看页面源代码,如果可以看到Html源代码,就说 阅读全文
posted @ 2012-03-07 10:55 贺满 阅读(439) 评论(0) 推荐(0) 编辑
摘要:ExamplesAll examples are designed to work on the live Watir demo form:http://bit.ly/watir-example.Loading RubyGemsIf you’re a first time Ruby user, you need to understand how to load Ruby gems such as Watir. You can require it via the-rubygemscommand line option or by using theRUBYOPTenvironment var 阅读全文
posted @ 2012-03-06 09:51 贺满 阅读(392) 评论(0) 推荐(0) 编辑
摘要:在 Watir 的 Wiki 上无意中看到的,激动的热泪盈眶啊,实在是佩服的五体投地,感谢这些热心的同行们整理了这些宝贵的资料啊。同志们,我们都要向国外的“雷锋”学习啊!另外,也建议大家从中学习一下文档整理和编写的技巧。The HTML Elements that are currently supported include:button<input> tags with type=button, submit, image or resetradio<input> tags with the type=radio; known as radio buttonsche 阅读全文
posted @ 2012-02-17 14:12 贺满 阅读(368) 评论(0) 推荐(0) 编辑
摘要:今天任务不多,有空看了些watir的资料,于是手痒痒的想做个例子练练,网上有个google搜索的示例,本人也就照猫画虎,写了一个baidu搜索的小例子。大牛就直接跳过吧。。。欢迎有兴起的朋友一起交流学习,共进步。代码如下:require 'watir'context = "hello"@broswer = Watir::IE.new@broswer.goto("http://www.baidu.com/")@broswer.text_field(:name,"wd").set(context)sleep 1@brosw 阅读全文
posted @ 2011-12-06 17:44 贺满 阅读(394) 评论(0) 推荐(0) 编辑
摘要:ruby官方网站:http://www.ruby-lang.org/zh_CN/ruby参考手册:http://www.kuqin.com/rubycndocument/man/index.htmlwatir官方网站:http://wtr.rubyforge.org/watir API:http://wtr.rubyforge.org/rdoc/selenium官方网站:http://selenium.openqa.org/RUBY DBI API:http://ruby-dbi.rubyforge.org/rdoc/index.html其他语言API:http://www.gotapi.co 阅读全文
posted @ 2011-12-06 16:56 贺满 阅读(362) 评论(0) 推荐(2) 编辑
摘要:文本框:<INPUT id="email" name="_fmu.u._0.e" value="" /> 方法1: ie.text_field(:id,'email').set("文本内容") 方法2: ie.text_field(:name, 'email').set("文本内容") 方法3: ie.text_field(:name,"email").clear下拉框:<SELECT name="cert_no&q 阅读全文
posted @ 2011-12-06 16:46 贺满 阅读(637) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示