class Capybara::RackTest::Node

def text_or_password?

def text_or_password?
  input_field? && (type == 'text' || type == 'password')
end