class OLE_QA::Framework::OLEFS::Load_Summary_Lookup

An OLE Financial System Load Summary Lookup page.

Public Class Methods

new(ole_session) click to toggle source
Calls superclass method OLE_QA::Framework::Page::new
# File lib/olefs/pages/load_summary_lookup.rb, line 18
def initialize(ole_session)
  url = ole_session.url + 'portal.do?channelTitle=Load%20Reports&channelUrl=batchlookup.do?methodToCall=start&businessObjectClassName=org.kuali.ole.select.businessobject.OleLoadSumRecords&docFormKey=88888888&returnLocation='
  url += ole_session.url + 'portal.do&hideReturnLink=true'
  super(ole_session, url)
end

Public Instance Methods

set_elements() click to toggle source

Define Load Summary Lookup screen elements.

# File lib/olefs/pages/load_summary_lookup.rb, line 25
def set_elements
  super
  element(:description_field)                   {b.text_field(:id => 'acqLoadDescription')}
  element(:filename_field)                      {b.text_field(:id => 'fileName')}
  element(:user_id_field)                       {b.text_field(:id => 'principalId')}
  element(:load_profile_selector)               {b.select_list(:id => 'profileId')}
  element(:date_from_field)                     {b.text_field(:name => 'rangeLowerBoundKeyPrefix_loadCreatedDate')}
  element(:date_to_field)                       {b.text_field(:id => 'loadCreatedDate')}
end
set_functions() click to toggle source

Define commonly used functions for Load Summary Lookup screen.

# File lib/olefs/pages/load_summary_lookup.rb, line 36
def set_functions
  super
  # Return the link to a document by any text in the row.
  function(:doc_link_by_text)               {|which| b.td(:xpath => "//table[@id='row']/descendant::td[contains(text(),'#{which}')]").parent.td(:index => 0).a}
  # Return the TD element containing the given text, if it exists in the search results.
  function(:text_in_results)                {|which| b.td(:xpath => "//table[@id='row']/descendant::td[contains(text(),'#{which}')]")}
  # Check whether the given text exists in the search results.
  function(:text_in_results?)               {|which| b.td(:xpath => "//table[@id='row']/descendant::td[contains(text(),'#{which}')]").present?}
end