Class: Lebowski::Foundation::Views::SelectButtonMenu

Inherits:
Panes::MenuPane show all
Defined in:
lib/lebowski/foundation/views/select_button.rb

Constant Summary

Constants included from Mixins::StallSupport

Mixins::StallSupport::DEFAULT_KEY_STALLS, Mixins::StallSupport::DEFAULT_STALL

Constants included from Lebowski::Foundation

SC_BRANCH_CLOSED, SC_BRANCH_OPEN, SC_BUTTON1_STATUS, SC_BUTTON2_STATUS, SC_BUTTON3_STATUS, SC_LEAF_NODE, SC_MIXED_STATE, SC_PICKER_FIXED, SC_PICKER_MENU, SC_PICKER_POINTER, SC_T_ARRAY, SC_T_BOOL, SC_T_CLASS, SC_T_ERROR, SC_T_FUNCTION, SC_T_HASH, SC_T_NULL, SC_T_NUMBER, SC_T_OBJECT, SC_T_STRING, SC_T_UNDEFINED

Constants included from Mixins::WaitActions

Mixins::WaitActions::DEFAULT_TIMEOUT

Instance Attribute Summary collapse

Attributes inherited from ProxyObject

#driver, #name, #parent, #rel_path

Instance Method Summary collapse

Methods inherited from Panes::MenuPane

#menu_items

Methods inherited from Panes::PickerPane

#click_off, #is_fixed?, #is_menu?, #is_pointer?

Methods inherited from Panes::PanelPane

#modal

Methods inherited from Panes::Pane

#attached?

Methods inherited from View

#abs_path, #action_locator_args, #action_target, #assigned_layer_id?, #child_views, #core_query, #frame, #height, #layer, #layer_id, #position, #scroll_to_visible, #scrollable_parent_view, #width

Methods included from Mixins::DelegateSupport

#get_delegate_property

Methods included from Mixins::UserActions

#basic_click, #click, #click_at, #double_click, #drag, #drag_after, #drag_before, #drag_on_to, #drag_to, #drag_to_end_of, #drag_to_start_of, #focus, #key_down, #key_up, #mouse_down, #mouse_down_at, #mouse_move, #mouse_move_at, #mouse_up, #mouse_up_at, #mouse_wheel_delta_x, #mouse_wheel_delta_y, #right_click, #right_click_at, #right_mouse_down, #right_mouse_down_at, #right_mouse_up, #right_mouse_up_at, #type, #type_key

Methods included from Mixins::StallSupport

adjust_all_stalls, adjust_default_key_stall, adjust_default_stall, reset, #stall

Methods included from Mixins::KeyCheck

#key_down?, #key_up?

Methods included from Mixins::PositionedElement

#height, #position, #position_relative_to, #scroll_to_visible, #width

Methods inherited from SCObject

#has_represented_sc_class?, #kind_of_represented_sc_class?, represented_sc_class, #represented_sc_class, representing_sc_class

Methods inherited from ProxyObject

#==, #[], #abs_path, #abs_path_with, #define, #define_proxy, #init_ext, #initialize, #method_missing, #none?, #object?, #proxy, #represent_as, #sc_all_classes, #sc_class, #sc_guid, #sc_kind_of?, #sc_path_defined?, #sc_type_of, #unravel_relative_path

Methods included from Mixins::DefinePathsSupport

#define_path, #define_paths_for, #defined_path, #defined_paths, #path_defined?, #root_defined_path_part, #root_defined_path_part=

Methods included from Mixins::WaitActions

#wait_until

Constructor Details

This class inherits a constructor from Lebowski::Foundation::ProxyObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Lebowski::Foundation::ProxyObject

Instance Attribute Details

#select_button=(value) ⇒ Object (writeonly)

Sets the attribute select_button

Parameters:

  • value

    the value to set the attribute select_button to.



51
52
53
# File 'lib/lebowski/foundation/views/select_button.rb', line 51

def select_button=(value)
  @select_button = value
end

Instance Method Details

#item_checked?(title) ⇒ Boolean

Returns:

  • (Boolean)


53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/lebowski/foundation/views/select_button.rb', line 53

def item_checked?(title)
  raise "The checkbox option is not enabled for this select button." if not @select_button.checkbox_enabled?
  menu_item = nil
  if title.kind_of? String
    menu_item = menu_items.find_first({ :title => /^#{title}$/i })
  elsif title.kind_of? Regexp
    menu_item = menu_items.find_first({ :title => title })
  else
    raise ArgumentInvalidTypeError.new "title", title, String, Regexp
  end
  return menu_item['content.checkbox']
end