Module: CapybaraPageObject::TextBasedInput

Included in:
Input, Textarea
Defined in:
lib/capybara-page-object/elements/text_based_input.rb

Instance Method Summary collapse

Instance Method Details

#clear!Object



4
5
6
# File 'lib/capybara-page-object/elements/text_based_input.rb', line 4

def clear!
  source.fill_in key, :with => ''
end

#keyObject



12
13
14
# File 'lib/capybara-page-object/elements/text_based_input.rb', line 12

def key
  source[:name]
end

#value=(value) ⇒ Object



8
9
10
# File 'lib/capybara-page-object/elements/text_based_input.rb', line 8

def value=(value)
  source.fill_in key, :with => value
end