Sha256: 78f28c3e5a49cb38ff62d728bcfe2396add4b803f1ff16c8fbb1d0df7f0400d5
Contents?: true
Size: 1.25 KB
Versions: 2
Compression:
Stored size: 1.25 KB
Contents
require 'spec_helper' require 'page-object/elements' describe PageObject::Elements::TextArea do let(:textarea) { PageObject::Elements::TextArea } describe "when mapping how to find an element" do it "should map watir types to same" do [:class, :id, :index, :name, :xpath].each do |t| identifier = textarea.watir_identifier_for t => 'value' identifier.keys.first.should == t end end it "should map selenium types to same" do [:class, :id, :name, :xpath, :index].each do |t| key, value = textarea.selenium_identifier_for t => 'value' key.should == t end end end describe "interface" do it "should register with tag_name :textarea" do ::PageObject::Elements.element_class_for(:textarea).should == ::PageObject::Elements::TextArea end context "for Selenium" do it "should set its' value" do text_area_element = double('text_area') text_area = PageObject::Elements::TextArea.new(text_area_element, :platform => :selenium_webdriver) text_area_element.should_receive(:clear) text_area_element.should_receive(:send_keys).with('Joseph') text_area.value = 'Joseph' end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
meeane-page-object-0.1.10 | spec/page-object/elements/text_area_spec.rb |
meeane-page-object-0.1.8 | spec/page-object/elements/text_area_spec.rb |