Created
March 7, 2013 20:00
-
-
Save pablofmorales/5111270 to your computer and use it in GitHub Desktop.
Watir example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rspec' | |
require 'watir-webdriver' | |
browser = Watir::Browser.new | |
RSpec.configure do |config| | |
config.before(:each) { @browser = browser } | |
config.after(:suite) { browser.close unless browser.nil? } | |
end | |
describe "siteadmin login functionality" do | |
it "In Brazil in listing's section I want to find just 1 featured ads" do | |
@browser.goto("http://saopaulo.olx.com.br/animais-cat-811") | |
@browser.wait | |
@browser.ul(:id => 'featuredBlock').as.length.should be > 1 | |
end | |
it "We need to content the featured ads call" do | |
@browser.goto("http://www.olx.com.mx/") | |
@browser.ul(:class => 'list-featured').as.length.should eq 6 | |
end | |
it "In listing I want to find featured ads. Almost 1" do | |
@browser.goto("http://www.olx.com.mx/compra-venta-cat-185") | |
@browser.wait | |
@browser.ul(:class => "featured").as.length.should be > 1 | |
@browser.close | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment