Sha256: 82f8860fa2c675167b6c61b4c8f7d89a2b82ea8dbf4cca5dc2b3c7c50a3527d0
Contents?: true
Size: 766 Bytes
Versions: 1
Compression:
Stored size: 766 Bytes
Contents
# encoding: utf-8 require File.expand_path('spec_helper', File.dirname(__FILE__)) describe "Divs" do before :each do browser.goto(WatirSpec.files + "/non_control_elements.html") end describe "#length" do it "returns the number of divs" do browser.divs.length.should == 12 end end describe "#[]" do it "returns the div at the given index" do browser.divs[1].id.should == "outer_container" end end describe "#each" do it "iterates through divs correctly" do count = 0 browser.divs.each_with_index do |d, index| d.id.should == browser.div(:index, index).id d.class_name.should == browser.div(:index, index).class_name count += 1 end count.should > 0 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
watir-webdriver-0.0.7 | spec/watirspec/divs_spec.rb |