Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Watir example
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
You can’t perform that action at this time.