Class: OLE_QA::Framework::OLEFS::Building_Lookup

Inherits:
Lookup show all
Defined in:
lib/olefs/pages/building_lookup.rb

Overview

The Building Lookup Screen in OLEFS

Instance Attribute Summary

Attributes inherited from Page

#lines, #url

Attributes inherited from Common_Object

#elements, #functions, #ole

Instance Method Summary collapse

Methods inherited from Page

#lookup, #lookup_url, #open, #wait_for_element, #wait_for_elements, #wait_for_page_to_load

Methods included from Page_Helpers

#set_line

Methods included from Helpers

#browser, #load_yml, #set_element, #set_function

Constructor Details

#initialize(ole_session) ⇒ Building_Lookup

Set URL and initialize.



19
20
21
22
23
24
25
26
# File 'lib/olefs/pages/building_lookup.rb', line 19

def initialize(ole_session)
  # Set @url instance variable from OLE Base URL variable
  url = ole_session.url + \
    'portal.do?channelTitle=Building&channelUrl=kr/lookup.do?methodToCall=start&businessObjectClassName=org.kuali.ole.sys.businessobject.Building&docFormKey=88888888&returnLocation='\
    + ole_session.url + \
    'portal.do&hideReturnLink=true'
  super(ole_session, url)
end

Instance Method Details

#set_elementsObject

Set Building Lookup screen elements.



29
30
31
32
33
34
# File 'lib/olefs/pages/building_lookup.rb', line 29

def set_elements
  super
  element(:campus_code_field)                             {b.text_field(:id => "campusCode")}
  element(:building_code_field)                           {b.text_field(:id => "buildingCode")}
  element(:building_name_field)                           {b.text_field(:id => "buildingName")}
end

#set_functionsObject



36
37
38
39
40
# File 'lib/olefs/pages/building_lookup.rb', line 36

def set_functions
  super
  # The 'return selection' link for a given text value in the search results.
  function(:return_result)                                {|which| b.td(:text => which).parent.td(:index => 0).a}
end