Class: PageObjectWrapper::Element
Direct Known Subclasses
Table
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from DslElement
#label_alias, #label_alias_value
Constructor Details
#initialize(label, type) ⇒ Element
Returns a new instance of Element.
7
8
9
10
11
12
13
|
# File 'lib/page_object_wrapper/Element.rb', line 7
def initialize(label, type)
super label
@type = type
= Hash.new
@press_action = :click
@required = false
end
|
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
5
6
7
|
# File 'lib/page_object_wrapper/Element.rb', line 5
def type
@type
end
|
Instance Method Details
19
20
21
|
# File 'lib/page_object_wrapper/Element.rb', line 19
def food_type, value
[food_type] = value
end
|
23
24
25
|
# File 'lib/page_object_wrapper/Element.rb', line 23
def
end
|
#press_action(action) ⇒ Object
27
28
29
|
# File 'lib/page_object_wrapper/Element.rb', line 27
def press_action action
@press_action = action
end
|
#press_action_value ⇒ Object
31
32
33
|
# File 'lib/page_object_wrapper/Element.rb', line 31
def press_action_value
@press_action
end
|
#required(flag) ⇒ Object
35
36
37
|
# File 'lib/page_object_wrapper/Element.rb', line 35
def required flag
@required = flag
end
|
#required_value ⇒ Object
39
40
41
|
# File 'lib/page_object_wrapper/Element.rb', line 39
def required_value
@required
end
|
#type_value ⇒ Object
15
16
17
|
# File 'lib/page_object_wrapper/Element.rb', line 15
def type_value
@type
end
|