Class: Domkey::View::LabelMapper
- Inherits:
-
Object
- Object
- Domkey::View::LabelMapper
- Defined in:
- lib/domkey/view/label_mapper.rb
Class Method Summary collapse
-
.find(pageobject) ⇒ Object
provide PageObject wrapping label corresponding to id of element in pageobject.
-
.for(collection) ⇒ Array<PageObject>
return collection of PageObjects for label locators corresponding to id of each element in a collection.
Class Method Details
.find(pageobject) ⇒ Object
provide PageObject wrapping label corresponding to id of element in pageobject.
18 19 20 |
# File 'lib/domkey/view/label_mapper.rb', line 18 def self.find pageobject PageObject.new -> { label(for: pageobject.element.id) }, pageobject.container end |
.for(collection) ⇒ Array<PageObject>
return collection of PageObjects for label locators corresponding to id of each element in a collection
11 12 13 14 15 |
# File 'lib/domkey/view/label_mapper.rb', line 11 def self.for collection collection.map do |e| PageObject.new -> { label(for: e.element.id) }, e.container end end |