Class: RAutomation::Adapter::MsUia::Checkbox
- Includes:
- ButtonHelper, Locators, WaitHelper
- Defined in:
- lib/rautomation/adapter/ms_uia/checkbox.rb
Instance Method Summary collapse
- #exist? ⇒ Boolean (also: #exists?)
- #value
Methods included from ButtonHelper
Methods inherited from Control
#assert_enabled, #bounding_rectangle, #click, #control_class, #control_name, #disabled?, #enabled?, #get_current_control_type, #has_focus?, #hwnd, #initialize, #matches_type?, #new_pid, #set_focus, #uia_element, #visible?
Constructor Details
This class inherits a constructor from RAutomation::Adapter::MsUia::Control
Instance Method Details
#exist? ⇒ Boolean Also known as: exists?
18 19 20 |
# File 'lib/rautomation/adapter/ms_uia/checkbox.rb', line 18 def exist? super && matches_type?(Constants::UIA_CHECKBOX_CONTROL_TYPE) end |
#value
9 10 11 12 13 14 15 16 |
# File 'lib/rautomation/adapter/ms_uia/checkbox.rb', line 9 def value hwnd = Functions.control_hwnd(@window.hwnd, @locators) checkbox = UiaDll::element_from_handle(hwnd) checkbox_value = FFI::MemoryPointer.new :char, UiaDll::get_name(checkbox, nil) + 1 UiaDll::get_name(checkbox, checkbox_value) checkbox_value.read_string end |