Sha256: a5eedcbaa0f8169be24897559625fc70181737089a291eb40866378dcb7e9e7c

Contents?: true

Size: 736 Bytes

Versions: 7

Compression:

Stored size: 736 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

7 entries across 7 versions & 2 rubygems

Version Path
page-object-lds-0.0.14 lib/page-object/elements/media.rb
page-object-lds-0.0.13 lib/page-object/elements/media.rb
page-object-lds-0.0.12 lib/page-object/elements/media.rb
page-object-lds-0.0.11 lib/page-object/elements/media.rb
page-object-lds-0.0.1 lib/page-object/elements/media.rb
meeane-page-object-0.1.10 lib/page-object/elements/media.rb
meeane-page-object-0.1.8 lib/page-object/elements/media.rb