Class: Profile2Search
- Inherits:
-
Profile2Base
- Object
- PageFactory
- BasePage
- Profile2Base
- Profile2Search
- Defined in:
- lib/sambal-cle/page_objects/profile2.rb
Instance Method Summary collapse
- #add_as_connection(name) ⇒ Object
-
#results ⇒ Object
Returns an array containing strings of the names of the users returned in the search.
Methods inherited from Profile2Base
Methods inherited from BasePage
basic_page_elements, button, damballa, frame_element, link
Instance Method Details
#add_as_connection(name) ⇒ Object
160 161 162 163 164 165 |
# File 'lib/sambal-cle/page_objects/profile2.rb', line 160 def add_as_connection(name) frm.div(:class=>"search-result", :text=>/#{Regexp.escape(name)}/).link(:class=>"icon connection-add").click frm.div(:class=>"modalWindowButtons").wait_until_present frm.div(:class=>"modalWindowButtons").(:value=>"Add connection").click frm.div(:class=>"modalWindowButtons").wait_while_present end |
#results ⇒ Object
Returns an array containing strings of the names of the users returned in the search.
171 172 173 174 175 176 177 178 179 |
# File 'lib/sambal-cle/page_objects/profile2.rb', line 171 def results results = [] frm.div(:class=>"portletBody").spans.each do |span| if span.class_name == "search-result-info-name" results << span.text end end return results end |