Class: RAutomation::Adapter::MsUia::Button

Inherits:
Control
  • Object
show all
Includes:
Locators, WaitHelper
Defined in:
lib/rautomation/adapter/ms_uia/button.rb

Constant Summary collapse

DEFAULT_LOCATORS =

Default locators used for searching buttons.

{:class => /button/i}

Instance Method Summary collapse

Methods inherited from Control

#assert_enabled, #bounding_rectangle, #click, #collapse, #control_class, #control_name, #disabled?, #enabled?, #expand, #focus, #focused?, #get_current_control_type, #hwnd, #initialize, #matches_type?, #new_pid, #search_information, #visible?

Constructor Details

This class inherits a constructor from RAutomation::Adapter::MsUia::Control

Instance Method Details

#exist?Boolean Also known as: exists?

Returns:

  • (Boolean)


17
18
19
# File 'lib/rautomation/adapter/ms_uia/button.rb', line 17

def exist?
  super && matches_type?(Constants::UIA_BUTTON_CONTROL_TYPE)
end

#value

todo - replace with UIA version

See Also:



13
14
15
# File 'lib/rautomation/adapter/ms_uia/button.rb', line 13

def value
  Functions.control_value(Functions.control_hwnd(@window.hwnd, @locators))
end