Sha256: 735b637fe91dbea7e0987cf9c357be56b78ecc0c50eabf7de453f1626c768e1c

Contents?: true

Size: 691 Bytes

Versions: 43

Compression:

Stored size: 691 Bytes

Contents

module PageObject
  module Elements
    class Media < Element

      def autoplay?
        attribute(:autoplay)
      end

      def has_controls?
        attribute(:controls)
      end

      def paused?
        attribute(:paused)
      end

      def duration
        duration = attribute(:duration)
        return duration.to_f if duration
      end

      def volume
        volume = attribute(:volume)
        return volume.to_i if volume
      end

      def ended?
        attribute(:ended)
      end

      def seeking?
        attribute(:seeking)
      end

      def loop?
        attribute(:loop)
      end

      def muted?
        attribute(:muted)
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 3 rubygems

Version Path
page-object-0.7.5 lib/page-object/elements/media.rb
page-object-0.7.4 lib/page-object/elements/media.rb
page-object-0.7.3 lib/page-object/elements/media.rb