Skip to content

Instantly share code, notes, and snippets.

View huangzhichong's full-sized avatar

Smart huangzhichong

  • BlueWhale IoT
  • Xi'an, China
View GitHub Profile
@huangzhichong
huangzhichong / automation_script.rb
Created July 17, 2012 08:59
demo automation script for my Selenium-Rspec framework
def action
it "Case1_This is the test case 1" do
$driver.get "http://cn.bing.com/"
$wait.until{ BingHome::LinksByName.new("Images").should_exist rescue false}
BingHome::SearchKeyInputBox.new().should_exist
BingHome::SearchButton.new().should_exist
end
it "Case2_This is the test case 2" do
BingHome::SearchKeyInputBox.new().should_exist
BingHome::SearchButton.new().should_exist
@huangzhichong
huangzhichong / Gemfile
Created July 17, 2012 06:05
Gemfile for my Selenium-Rspec automation framework
source 'http://rubygems.org'
#gem 'activerecord'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'rspec'
gem 'selenium-webdriver'
@huangzhichong
huangzhichong / main.rb
Created July 17, 2012 06:03
main enter point for my Selenium-Rspec automation framework
require 'yaml'
require 'rspec'
require 'rspec/expectations'
require 'selenium-webdriver'
# ruby main.rb "Camps AUI BVT 1" "firefox" "INT" "9527"
# handle the arguments.
$plan_name=ARGV.shift.dup
$round_id= ARGV.shift.dup