Module: Watir::UserEditable

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

Instance Method Summary (collapse)

Instance Method Details

- (Object) append(*args) Also known as: <<

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



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

def append(*args)
  assert_exists
  assert_writable

  @element.send_keys(*args)
end

- (Object) clear

Clear the text field.



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

def clear
  assert_exists
  @element.clear
end

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

Clear the element, the type in the given value.



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

def set(*args)
  assert_exists
  assert_writable

  @element.clear
  @element.send_keys(*args)
end