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.