Module: Watir::UserEditable

Included in:
TextArea, TextField
Defined in:
lib/watir-webdriver/user_editable.rb

Instance Method Summary collapse

Instance Method Details

#append(*args) ⇒ Object Also known as: <<

Appends the given value to the text in the text field.

Parameters:



22
23
24
# File 'lib/watir-webdriver/user_editable.rb', line 22

def append(*args)
  send_keys(*args)
end

#clearObject

Clears the text field.



31
32
33
34
35
# File 'lib/watir-webdriver/user_editable.rb', line 31

def clear
  assert_exists
  assert_writable
  element_call { @element.clear }
end

#set(*args) ⇒ Object Also known as: value=

Clear the element, the type in the given value.

Parameters:



10
11
12
13
# File 'lib/watir-webdriver/user_editable.rb', line 10

def set(*args)
  clear
  element_call { @element.send_keys(*args) }
end