Class: RAutomation::TextField

Inherits:
Object
  • Object
show all
Defined in:
lib/rautomation/text_field.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args)

Allows to execute specific Adapter methods not part of the public API.



48
49
50
# File 'lib/rautomation/text_field.rb', line 48

def method_missing(name, *args)
  @text_field.send(name, *args)
end

Instance Method Details

#clear

Clears text field’s text.

Raises:



21
22
23
24
# File 'lib/rautomation/text_field.rb', line 21

def clear
  wait_until_exists
  @text_field.clear
end

#exists?Boolean Also known as: exist?

Checks if the text field exists.

Returns:

  • (Boolean)

    true if text field exists, false otherwise.



36
37
38
# File 'lib/rautomation/text_field.rb', line 36

def exists?
  @text_field.exists?
end

#hwnd



40
41
42
43
# File 'lib/rautomation/text_field.rb', line 40

def hwnd
  wait_until_exists
  @text_field.hwnd
end

#set(text)

Sets text of the text field.

Parameters:

  • text (String)

    of the field to set.

Raises:



14
15
16
17
# File 'lib/rautomation/text_field.rb', line 14

def set(text)
  wait_until_exists
  @text_field.set(text)
end

#valueString

Returns text field’s current value (text).

Returns:

  • (String)

    the value (text) of the text field.

Raises:



29
30
31
32
# File 'lib/rautomation/text_field.rb', line 29

def value
  wait_until_exists
  @text_field.value
end