Deleting multiple characters 12/08/2013
# Sending the backspace key to an input a number of times
5.times { browser.input(id: 'password').send_keys(:backspace) }

# or with the do block
5.times do
  browser.input(id: 'password').send_keys(:backspace)
end

Instead of deleting characters one at a time, the same operation can be repeated as many times as required with the ruby times operator.

Deleting characters one at a time 12/08/2013
# Sending the backspace key to an input
browser.input(id: 'password').send_keys(:backspace)

Deleting characters one at a time can be useful when testing, for example, form validation to see how the validation behaves when the text becomes shorter than the minimum.

Sending a key to an element 15/01/2013
# Using send_keys to submit information
browser.text_field(id: 'email').send_keys(:enter)

# Use send_keys to scroll a page down in a text area element
browser.textarea(id: 'document').send_keys(:page_down)

One way to send input or other special characters to an element on the page is to use the send_key command.

A full list of keys that can be used can be found from

Selenium documentation