Class: FormObjectModel::Form::TextField

Inherits:
Field
  • Object
show all
Defined in:
lib/form_object_model/form.rb

Instance Attribute Summary

Attributes inherited from Field

#locator, #name, #page

Instance Method Summary collapse

Instance Method Details

#fill(value) ⇒ Object



5
6
7
# File 'lib/form_object_model/form.rb', line 5

def fill(value)
  page.fill_in(locator, :with => value.to_s)
end

#has_value?(value) ⇒ Boolean



9
10
11
# File 'lib/form_object_model/form.rb', line 9

def has_value?(value)
  page.has_field?(locator, :with => value.to_s)
end

#valueObject



13
14
15
# File 'lib/form_object_model/form.rb', line 13

def value
  page.find_field(locator).value
end