Module: TestAbstractions::Form
- Defined in:
- lib/test_abstractions/form.rb
Defined Under Namespace
Modules: ClassMethods
Classes: ActuatorMacro, URIMacro
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Instance Attribute Details
#evidence ⇒ Object
Returns the value of attribute evidence.
8
9
10
|
# File 'lib/test_abstractions/form.rb', line 8
def evidence
@evidence
end
|
#fields ⇒ Object
Returns the value of attribute fields.
9
10
11
|
# File 'lib/test_abstractions/form.rb', line 9
def fields
@fields
end
|
Class Method Details
.included(base) ⇒ Object
3
4
5
6
|
# File 'lib/test_abstractions/form.rb', line 3
def self.included(base)
base.send :include, Client::Accessor
base.extend ClassMethods
end
|
Instance Method Details
#actuate ⇒ Object
Also known as:
!
11
12
13
14
15
16
17
18
|
# File 'lib/test_abstractions/form.rb', line 11
def actuate
element = client.find actuator
raise "Element #{actuator} not found" unless element
actuating! if respond_to? :actuating!
element.click
actuated! if respond_to? :actuated!
evidence
end
|
#fill(data, filler = nil) ⇒ Object
21
22
23
24
25
|
# File 'lib/test_abstractions/form.rb', line 21
def fill(data, filler=nil)
filler ||= Filler.build data, self
filler.!
filler
end
|
#open ⇒ Object
27
28
29
|
# File 'lib/test_abstractions/form.rb', line 27
def open
client.open uri
end
|