Class: Sandals::TestSession::FieldLocator
- Inherits:
-
Object
- Object
- Sandals::TestSession::FieldLocator
- Defined in:
- lib/sandals/test_session.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
Instance Method Summary collapse
- #attach(file) ⇒ Object
- #check ⇒ Object
- #choose(option) ⇒ Object
- #fill(value) ⇒ Object
-
#initialize(session, label) ⇒ FieldLocator
constructor
A new instance of FieldLocator.
- #inspect ⇒ Object
- #select(option) ⇒ Object
- #uncheck ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(session, label) ⇒ FieldLocator
Returns a new instance of FieldLocator.
10 11 12 13 |
# File 'lib/sandals/test_session.rb', line 10 def initialize(session, label) @session = session @label = label.to_s end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
8 9 10 |
# File 'lib/sandals/test_session.rb', line 8 def label @label end |
Instance Method Details
#attach(file) ⇒ Object
39 40 41 |
# File 'lib/sandals/test_session.rb', line 39 def attach(file) @session.attach(label, file:) end |
#check ⇒ Object
19 20 21 |
# File 'lib/sandals/test_session.rb', line 19 def check @session.check(label) end |
#choose(option) ⇒ Object
31 32 33 |
# File 'lib/sandals/test_session.rb', line 31 def choose(option) @session.choose(option, from: label) end |
#fill(value) ⇒ Object
15 16 17 |
# File 'lib/sandals/test_session.rb', line 15 def fill(value) @session.fill(label, with: value) end |
#inspect ⇒ Object
43 44 45 |
# File 'lib/sandals/test_session.rb', line 43 def inspect %(#<#{self.class} label="#{label}">) end |
#select(option) ⇒ Object
27 28 29 |
# File 'lib/sandals/test_session.rb', line 27 def select(option) @session.select(option, from: label) end |
#uncheck ⇒ Object
23 24 25 |
# File 'lib/sandals/test_session.rb', line 23 def uncheck @session.uncheck(label) end |
#value ⇒ Object
35 36 37 |
# File 'lib/sandals/test_session.rb', line 35 def value @session.field_value(label) end |