Class: RAutomation::Adapter::WinFfi::Button

Inherits:
Control
  • Object
show all
Includes:
WaitHelper
Defined in:
lib/rautomation/adapter/win_ffi/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, #click, #disabled?, #enabled?, #has_focus?, #initialize, #matches_type, #set_focus, #uia_control

Constructor Details

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

Instance Method Details

#exist?Boolean Also known as: exists?

Returns:

  • (Boolean)


16
17
18
# File 'lib/rautomation/adapter/win_ffi/button.rb', line 16

def exist?
  @locators[:id].nil? ? super : super && matches_type(Constants::UIA_BUTTON_CONTROL_TYPE)
end

#value

See Also:



12
13
14
# File 'lib/rautomation/adapter/win_ffi/button.rb', line 12

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