Sha256: 6607a0b95d7eea002886a7ae6528764479173501e84f6dd516ab4bb519e7ad46

Contents?: true

Size: 461 Bytes

Versions: 2

Compression:

Stored size: 461 Bytes

Contents

module PageObject
  module Elements
    class Image < Element

      #
      # Return the width of the image.
      #
      def width
        element.width
      end

      #
      # Return the height of the image
      #
      def height
        element.height
      end

      protected

      def self.watir_finders
        super + [:alt, :src]
      end

    end

    ::PageObject::Elements.tag_to_class[:img] = ::PageObject::Elements::Image
    
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
page-object-2.1.1 lib/page-object/elements/image.rb
page-object-2.1 lib/page-object/elements/image.rb