Sha256: af773f2ed1d22d3005c70736d0b166942a7a0b950e28af473f7fe23549ce0dde

Contents?: true

Size: 1.08 KB

Versions: 3

Compression:

Stored size: 1.08 KB

Contents

require File.dirname(__FILE__) + '/spec_helper'

describe "Watirloo browser when no browsers on desktop nor in locker" do

  before(:all) do
    Watirloo::Desktop.clear
    Watirloo::Locker.clear
  end

  it "should start a default new browser and load a testfile" do
    browser = Watirloo.browser
    browser.should be_kind_of(Watir::IE)
    browser.goto testfile('person.html')
  end
  
  it 'should attach to a default browser with loaded testfile and return its title' do
    browser = Watirloo.browser
    browser.should be_kind_of(Watir::IE)
    browser.title.should == 'Person'
  end
  
  it "should start second browser with a named keyword" do
    Watirloo.browser 'second'
  end

  it 'should attach to second browser with keyword and navigate to a testfile' do
    browser2 = Watirloo.browser 'second'
    browser2.goto testfile('census.html')
  end
    
  it 'should attach to two distinct browsers by key values by kewords used to start them' do
    b2 = Watirloo.browser 'second'
    b1 = Watirloo.browser 'default'
    b2.title.should == 'Census'
    b1.title.should == 'Person'
  end

end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
marekj-watirloo-0.0.5 spec/browser_spec.rb
watirloo-0.0.8 spec/browser_spec.rb
watirloo-0.0.7 spec/browser_spec.rb