Class: TestCentricity::ListRadio

Inherits:
ListElement show all
Defined in:
lib/testcentricity_web/web_elements/list_radio.rb

Constant Summary

Constants inherited from UIElement

UIElement::CSS_SELECTORS, UIElement::XPATH_SELECTORS

Instance Attribute Summary collapse

Attributes inherited from ListElement

#element_locator, #list

Attributes inherited from UIElement

#alt_locator, #context, #locator, #locator_type, #name, #original_style, #parent, #type

Instance Method Summary collapse

Methods inherited from ListElement

#click, #exists?, #find_list_element, #get_value, #list_object_not_found_exception

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, #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_siebel_object_type, #get_value, #height, #hidden?, #highlight, #hover, #hover_at, #inspect, #invoke_siebel_dialog, #obscured?, #right_click, #role, #scroll_to, #send_keys, #set, #set_alt_locator, #set_locator_type, #style, #tabindex, #title, #unhighlight, #verify_value, #visible?, #wait_until_exists, #wait_until_gone, #wait_until_hidden, #wait_until_value_changes, #wait_until_value_is, #wait_until_visible, #width, #x, #y

Constructor Details

#initialize(name, parent, locator, context, list, proxy = nil) ⇒ ListRadio

Returns a new instance of ListRadio.



5
6
7
8
9
# File 'lib/testcentricity_web/web_elements/list_radio.rb', line 5

def initialize(name, parent, locator, context, list, proxy = nil)
  super
  @type  = :list_radio
  @proxy = proxy
end

Instance Attribute Details

#proxyObject

Returns the value of attribute proxy.



3
4
5
# File 'lib/testcentricity_web/web_elements/list_radio.rb', line 3

def proxy
  @proxy
end

Instance Method Details

#select(row) ⇒ Object



23
24
25
# File 'lib/testcentricity_web/web_elements/list_radio.rb', line 23

def select(row)
  set_selected_state(row, true)
end

#selected?(row) ⇒ Boolean

Returns:

  • (Boolean)


11
12
13
14
15
# File 'lib/testcentricity_web/web_elements/list_radio.rb', line 11

def selected?(row)
  obj, = find_list_element(row)
  list_object_not_found_exception(obj, 'List Radio', row)
  obj.checked?
end

#set_selected_state(row, state) ⇒ Object



17
18
19
20
21
# File 'lib/testcentricity_web/web_elements/list_radio.rb', line 17

def set_selected_state(row, state)
  obj, = find_list_element(row)
  list_object_not_found_exception(obj, 'List Radio', row)
  obj.set(state)
end

#unselect(row) ⇒ Object



27
28
29
# File 'lib/testcentricity_web/web_elements/list_radio.rb', line 27

def unselect(row)
  set_selected_state(row, false)
end