随笔分类 -  Ruby

摘要:I have faced one issue, after running the ruby code, version 1.8.7, it will report error as following,Issue:>ruby test.rbtest.rb:2:in `require': no such file to load -- watir (LoadError) from test.rb:2>Exit code: 1Solution:Before require “watir”, add require “rubygems”.require "rubyge 阅读全文
posted @ 2010-07-08 11:35 NikeyL 阅读(575) 评论(0) 推荐(0)
摘要:1, 在命令行里面输入:gem server2, 在浏览器里面输入:http://127.0.0.1:8808/,即可列出机器已经安装的gem包。3, 在线查阅安装的gem包。 在Filter/Search里面输入:watir,即可查看watir包里面的所有类和方法。4, 在线查阅Core API。http://www.ruby-doc.org/core/ 阅读全文
posted @ 2010-06-30 18:05 NikeyL 阅读(432) 评论(1) 推荐(0)
摘要:尝试了一天,终于找到可以连接SQL Server的方法了。第一种方法,使用win32ole连接。特别注意红色部分哦,网络上面很多人报出来的错误都是因为连接的字符串的Provider有问题,修改为红色的值,就可以和SQL server的native client连接成功了。require 'win32ole'class SqlServer # This class manages database connection and queries attr_accessor :connection, :data, :fields attr_writer :username, :pas 阅读全文
posted @ 2010-06-11 18:58 NikeyL 阅读(1285) 评论(0) 推荐(0)
摘要:1) Install the FireWatir Gemgem install firewatir2) Install the JSSH Firefox ExtensionFirefox 3.6 on Windows: http://wiki.openqa.org/download/attachments/13893658/jssh-3.6-WINNT.xpi?version=1&modificationDate=12644899259063) Ensure Firefox settings are correctCertain firefox settings need to be 阅读全文
posted @ 2010-06-10 13:58 NikeyL 阅读(618) 评论(0) 推荐(0)
摘要:Ruby Reference Websites are as below,1. DownloadRuby Download: http://www.ruby-lang.org/en/downloads/Gem Download: http://rubygems.org/2. FAQWatir FAQ: http://wiki.openqa.org/display/WTR/FAQ3. TutorialRuby Tutorial: http://wiki.openqa.org/display/WTR/TutorialPrintable Tutorial: http://wiki.openqa.or 阅读全文
posted @ 2010-04-20 10:10 NikeyL 阅读(188) 评论(0) 推荐(0)
摘要:Ruby: object-oriented scripting language.Watir: Web Application Testing in Ruby.Require the Watir Tool:require ‘watir’Create a Test Instance of Internet Explorer:ie = Watir::IE.newCreate an instance of Internet Explorer and navigate to the site with one statement:ie = Watir :: IE.start(“http://www.g 阅读全文
posted @ 2010-04-15 23:31 NikeyL 阅读(179) 评论(0) 推荐(0)
摘要:同事ZK推荐使用Watir做自动化测试,感觉Watir和Ruby很灵活,上手很快,还不错,而且还是免费的。。。。初学者通过网站学习,很快就可以写出来第一个test case of Google Test.For beginner: http://wiki.openqa.org/display/WTR/Tutorial经验总结下:1. 关于安装:Step 1 - Install RubyStep 2 - Install WatirStep 3 - Run the Watir Unit Tests (optional)Step 4 - Install the IE Developer Toolba 阅读全文
posted @ 2010-04-14 10:23 NikeyL 阅读(488) 评论(0) 推荐(0)