Skip to content

Instantly share code, notes, and snippets.

@huangzhichong
Created July 17, 2012 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huangzhichong/3128194 to your computer and use it in GitHub Desktop.
Save huangzhichong/3128194 to your computer and use it in GitHub Desktop.
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
sleep 3
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment