Sha256: 969674b887ec664533038bf05216a10a37358dd8be278e511bec6c2a9f69d1ff

Contents?: true

Size: 639 Bytes

Versions: 2

Compression:

Stored size: 639 Bytes

Contents

module PageObject
  module Elements
    class Button < Element

      def initialize(element, platform)
        @element = element
        include_platform_for platform
      end

      protected

      def self.watir_finders
        super + [:text, :value]
      end

      def self.selenium_finders
        super + [:value]
      end

      def include_platform_for platform
        super
        if platform[:platform] == :selenium_webdriver
          require 'page-object/platforms/selenium_webdriver/button'
          self.class.send :include, PageObject::Platforms::SeleniumWebDriver::Button
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
page-object-0.5.1 lib/page-object/elements/button.rb
page-object-0.5.0 lib/page-object/elements/button.rb