Sha256: a3837d6d5686d5b52ca701f21e869c5833315f051feda0e04439cbf903cc65df
Contents?: true
Size: 1.2 KB
Versions: 6
Compression:
Stored size: 1.2 KB
Contents
require 'spec_helper' require 'page-object/elements' describe PageObject::Elements::HiddenField do let(:hiddenfield) { PageObject::Elements::HiddenField } describe "when mapping how to find an element" do it "should map watir types to same" do [:class, :id, :index, :name, :tag_name, :text, :xpath, :value].each do |t| identifier = hiddenfield.watir_identifier_for t => 'value' identifier.keys.first.should == t end end it "should map selenium types to watir" do identifier = hiddenfield.watir_identifier_for :css => 'value' identifier.keys.first.should == :tag_name end it "should map selenium types to same" do [:class, :css, :id, :name, :xpath, :index, :value].each do |t| key, value = hiddenfield.selenium_identifier_for t => 'value' key.should == t end end it "should map watir types to selenium" do key, value = hiddenfield.selenium_identifier_for :tag_name => 'value' key.should == :css end end describe "interface" do it "should register with type :hidden" do ::PageObject::Elements.element_class_for(:input, :hidden).should == ::PageObject::Elements::HiddenField end end end
Version data entries
6 entries across 6 versions & 1 rubygems