Sha256: 07d811eb70c87ec927951c36421176da6f50a9c4dbce401c5970ba18222191f3

Contents?: true

Size: 627 Bytes

Versions: 6

Compression:

Stored size: 627 Bytes

Contents

module PageObject
  module Elements
    class HiddenField < Element

      def click
        raise "click is not available on hidden field element with Selenium or Watir"
      end

      protected

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

      def self.watir_mapping
        super.merge({:css => :tag_name})
      end

      def self.selenium_finders
        super + [:css, :value]
      end

      def self.selenium_mapping
        super.merge({:tag_name => :css})
      end
    end

    ::PageObject::Elements.type_to_class[:hidden] = ::PageObject::Elements::HiddenField
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
page-object-0.6.4 lib/page-object/elements/hidden_field.rb
page-object-0.6.3 lib/page-object/elements/hidden_field.rb
page-object-0.6.2 lib/page-object/elements/hidden_field.rb
page-object-0.6.1 lib/page-object/elements/hidden_field.rb
page-object-0.6 lib/page-object/elements/hidden_field.rb
page-object-0.5.5 lib/page-object/elements/hidden_field.rb