Sha256: 2231b9888348ca4f596930504d64d29d8901e18be5419461b2ae2a92fdf04334

Contents?: true

Size: 655 Bytes

Versions: 12

Compression:

Stored size: 655 Bytes

Contents

# encoding: utf-8
require File.dirname(__FILE__) + '/spec_helper'

describe "Ps" do

  before :each do
    browser.goto(WatirSpec.files + "/non_control_elements.html")
  end

  describe "#length" do
    it "returns the number of ps" do
      browser.ps.length.should == 5
    end
  end

  describe "#[]" do
    it "returns the p at the given index" do
      browser.ps[0].id.should == "lead"
    end
  end

  describe "#each" do
    it "iterates through ps correctly" do
      browser.ps.each_with_index do |p, index|
        p.id.should == browser.p(:index, index).id
        p.value.should == browser.p(:index, index).value
      end
    end
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
watir-webdriver-0.0.6 spec/watirspec/ps_spec.rb
watir-webdriver-0.0.5 spec/watirspec/ps_spec.rb
watir-webdriver-0.0.4 spec/watirspec/ps_spec.rb
watir-webdriver-0.0.3 spec/watirspec/ps_spec.rb
watir-webdriver-0.0.2 spec/watirspec/ps_spec.rb
watir-webdriver-0.0.1 spec/watirspec/ps_spec.rb
watir-webdriver-0.0.1.dev7 spec/watirspec/ps_spec.rb
watir-webdriver-0.0.1.dev5 spec/watirspec/ps_spec.rb
watir-webdriver-0.0.1.dev4 spec/watirspec/ps_spec.rb
watir-webdriver-0.0.1.dev3 spec/watirspec/ps_spec.rb
watir-webdriver-0.0.1.dev2 spec/watirspec/ps_spec.rb
watir-webdriver-0.0.1.dev spec/watirspec/ps_spec.rb