Sha256: 0a1680b02a43c97649172f307c7c63cb067c2ff2b75db26edabf825ec711fea3

Contents?: true

Size: 1.06 KB

Versions: 26

Compression:

Stored size: 1.06 KB

Contents

module TestCentricity
  module Elements
    class Video < Media
      def initialize(name, parent, locator, context)
        super
        @type = :video
      end

      # Return video Height property
      #
      # @return [Integer] video height
      # @example
      #   height = video_player.video_height
      #
      def video_height
        obj, = find_element
        object_not_found_exception(obj, :video)
        obj.native.attribute('videoHeight').to_i
      end

      # Return video Width property
      #
      # @return [Integer] video width
      # @example
      #   width = video_player.video_width
      #
      def video_width
        obj, = find_element
        object_not_found_exception(obj, :video)
        obj.native.attribute('videoWidth').to_i
      end

      # Return video poster property
      #
      # @return poster value
      # @example
      #   poster = video_player.poster
      #
      def poster
        obj, = find_element
        object_not_found_exception(obj, :video)
        obj.native.attribute('poster')
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
testcentricity_web-4.6.0 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.5.15 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.5.14 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.5.13 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.5.12 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.5.11 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.5.10 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.5.9.1 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.5.9 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.5.7 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.5.6 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.5.5 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.5.4 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.5.3 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.5.2 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.5.1 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.5.0 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.4.7 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.4.6 lib/testcentricity_web/web_elements/video.rb
testcentricity_web-4.4.5 lib/testcentricity_web/web_elements/video.rb