Sha256: 5ae39cc0f1834b733db7058bd59abe6f46d3e19494166dc2153cfd5b9ac7ae2e
Contents?: true
Size: 815 Bytes
Versions: 2
Compression:
Stored size: 815 Bytes
Contents
# encoding: utf-8 require File.expand_path('spec_helper', File.dirname(__FILE__)) 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 count = 0 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 count += 1 end count.should > 0 end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
watir-webdriver-0.0.9 | spec/watirspec/ems_spec.rb |
watir-webdriver-0.0.8 | spec/watirspec/ems_spec.rb |