Sha256: 73b058661dbd6a2bebb14dc846070eb476fb9a128e87e8af776f5be4854bbb51

Contents?: true

Size: 421 Bytes

Versions: 10

Compression:

Stored size: 421 Bytes

Contents

require 'page-object/locator_generator'

module PageObject
  module  ElementLocators

    def self.included(cls)
      ::PageObject::LocatorGenerator.generate_locators(cls)
    end

    def element(tag, identifier={:index => 0})
      platform.element_for(tag, identifier.clone)
    end

    private

    def locator(identifier)
      identifier[0] ? identifier[0] : {:index => 0}
    end

  end
end

Version data entries

10 entries across 10 versions & 4 rubygems

Version Path
centric_page_object-2.3.1 lib/page-object/element_locators.rb
page-object-2.3.1 lib/page-object/element_locators.rb
page-object-2.3.0 lib/page-object/element_locators.rb
page-object-lds-0.0.14 lib/page-object/element_locators.rb
page-object-lds-0.0.13 lib/page-object/element_locators.rb
page-object-lds-0.0.12 lib/page-object/element_locators.rb
page-object-lds-0.0.11 lib/page-object/element_locators.rb
page-object-lds-0.0.1 lib/page-object/element_locators.rb
meeane-page-object-0.1.10 lib/page-object/element_locators.rb
meeane-page-object-0.1.8 lib/page-object/element_locators.rb