Class: FormObjectModel::TextField

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

Instance Attribute Summary

Attributes inherited from Field

#locator, #name, #page

Instance Method Summary collapse

Methods inherited from Field

#==

Instance Method Details

#fill(value) ⇒ Object



3
4
5
# File 'lib/form_object_model/text_field.rb', line 3

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

#has_value?(value) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/form_object_model/text_field.rb', line 7

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

#valueObject



11
12
13
# File 'lib/form_object_model/text_field.rb', line 11

def value
  page.find_field(locator).value
end