Sha256: ec2857c0309a6abd4fef35bdf81bf4e56884a73bc75d953911b80e49e899f48a

Contents?: true

Size: 738 Bytes

Versions: 12

Compression:

Stored size: 738 Bytes

Contents

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

describe "Ems" do

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

  describe "#length" do
    it "returns the number of ems" do
      browser.ems.length.should == 1
    end
  end

  describe "#[]" do
    it "returns the em at the given index" do
      browser.ems[0].id.should == "important-id"
    end
  end

  describe "#each" do
    it "iterates through ems correctly" do
      browser.ems.each_with_index do |e, index|
        e.text.should == browser.em(:index, index).text
        e.id.should == browser.em(:index, index).id
        e.class_name.should == browser.em(:index, index).class_name
      end
    end
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

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