Sha256: ceb8807aa0b64e73436de122e4d3d68467eda1131b2a3a44d1fb6e390c58a165

Contents?: true

Size: 650 Bytes

Versions: 2

Compression:

Stored size: 650 Bytes

Contents

require 'spec_helper'
require 'page-object/elements'

describe PageObject::Elements::Button do
  let(:button) { PageObject::Elements::Button }
  
  context "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 = button.watir_identifier_for t => 'value'
        identifier.keys.first.should == t
      end
    end

    it "should map selenium types to same" do
      [:class, :id, :name, :xpath].each do |t|
        key, value = button.selenium_identifier_for t => 'value'
        key.should == t
      end
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
page-object-0.0.2 spec/page-object/elements/button_spec.rb
page-object-0.0.1 spec/page-object/elements/button_spec.rb