Class: TestCentricity::Elements::Video

Inherits:
Media show all
Defined in:
lib/testcentricity_web/web_elements/video.rb

Constant Summary

Constants inherited from UIElement

UIElement::CSS_SELECTORS, UIElement::XPATH_SELECTORS

Instance Attribute Summary

Attributes inherited from UIElement

#alt_locator, #base_object, #context, #locator, #locator_type, #mru_driver, #mru_locator, #mru_object, #mru_parent, #name, #original_style, #parent, #type

Instance Method Summary collapse

Methods inherited from Media

#active_track, #active_track_data, #active_track_source, #all_tracks_data, #autoplay?, #controls?, #current_time, #current_time=, #default_muted?, #default_playback_rate, #duration, #ended?, #loop?, #mute, #muted?, #pause, #paused?, #play, #playback_rate, #playback_rate=, #preload, #ready_state, #seeking?, #src, #track_count, #track_data, #track_source, #unmute, #volume, #volume=, #wait_until_ready_state_is

Methods inherited from UIElement

#aria_autocomplete, #aria_busy?, #aria_checked?, #aria_colcount, #aria_controls, #aria_describedby, #aria_disabled?, #aria_expanded?, #aria_haspopup?, #aria_hidden?, #aria_invalid?, #aria_keyshortcuts, #aria_label, #aria_labelledby, #aria_live, #aria_modal?, #aria_multiline?, #aria_multiselectable?, #aria_orientation, #aria_pressed?, #aria_readonly?, #aria_required?, #aria_roledescription, #aria_rowcount, #aria_selected?, #aria_sort, #aria_valuemax, #aria_valuemin, #aria_valuenow, #aria_valuetext, #clear_alt_locator, #click, #click_at, #content_editable?, #count, #crossorigin, #disabled?, #displayed?, #double_click, #drag_and_drop, #drag_by, #enabled?, #exists?, #find_element, #focused?, #get_attribute, #get_locator, #get_locator_type, #get_name, #get_native_attribute, #get_object_type, #get_value, #height, #hidden?, #highlight, #hover, #hover_at, #obscured?, #required?, #reset_mru_cache, #right_click, #role, #scroll_to, #send_keys, #set, #set_alt_locator, #set_locator_type, #style, #tabindex, #title, #unhighlight, #verify_value, #visible?, #wait_until_enabled, #wait_until_exists, #wait_until_gone, #wait_until_hidden, #wait_until_value_changes, #wait_until_value_is, #wait_until_visible, #wait_while_busy, #width, #x, #y

Constructor Details

#initialize(name, parent, locator, context) ⇒ Video

Returns a new instance of Video.



4
5
6
7
# File 'lib/testcentricity_web/web_elements/video.rb', line 4

def initialize(name, parent, locator, context)
  super
  @type = :video
end

Instance Method Details

#posterObject

Return video poster property

Examples:

poster = video_player.poster

Returns:

  • poster value



39
40
41
42
43
# File 'lib/testcentricity_web/web_elements/video.rb', line 39

def poster
  obj, = find_element
  object_not_found_exception(obj, :video)
  obj.native.attribute('poster')
end

#video_heightInteger

Return video Height property

Examples:

height = video_player.video_height

Returns:

  • (Integer)

    video height



15
16
17
18
19
# File 'lib/testcentricity_web/web_elements/video.rb', line 15

def video_height
  obj, = find_element
  object_not_found_exception(obj, :video)
  obj.native.attribute('videoHeight').to_i
end

#video_widthInteger

Return video Width property

Examples:

width = video_player.video_width

Returns:

  • (Integer)

    video width



27
28
29
30
31
# File 'lib/testcentricity_web/web_elements/video.rb', line 27

def video_width
  obj, = find_element
  object_not_found_exception(obj, :video)
  obj.native.attribute('videoWidth').to_i
end