Class: RAutomation::Adapter::MsUia::TextField
- Includes:
- Locators, WaitHelper
- Defined in:
- lib/rautomation/adapter/ms_uia/text_field.rb
Constant Summary collapse
- DEFAULT_LOCATORS =
Default locators used for searching text fields.
{:class => /edit/i}
Instance Method Summary collapse
- #clear
- #exist? ⇒ Boolean (also: #exists?)
-
#set(text)
todo - replace with UIA version.
-
#value
todo - replace with UIA version.
Methods inherited from Control
#assert_enabled, #bounding_rectangle, #cached_hwnd, #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
#clear
19 20 21 22 |
# File 'lib/rautomation/adapter/ms_uia/text_field.rb', line 19 def clear raise "Cannot set value on a disabled text field" if disabled? set "" end |
#exist? ⇒ Boolean Also known as: exists?
30 31 32 |
# File 'lib/rautomation/adapter/ms_uia/text_field.rb', line 30 def exist? super && matches_type?(Constants::UIA_EDIT_CONTROL_TYPE, Constants::UIA_DOCUMENT_CONTROL_TYPE) end |
#set(text)
todo - replace with UIA version
13 14 15 16 |
# File 'lib/rautomation/adapter/ms_uia/text_field.rb', line 13 def set(text) raise "Cannot set value on a disabled text field" if disabled? UiaDll::set_text(search_information, text) end |