Class: OLE_QA::Framework::OLELS::Patron_Lookup

Inherits:
Lookup show all
Defined in:
lib/olels/pages/patron_lookup.rb

Overview

The Patron lookup page in the OLE Library System.

Instance Attribute Summary

Attributes inherited from Page

#lines, #url

Attributes inherited from Common_Object

#elements, #functions, #ole

Instance Method Summary collapse

Methods inherited from Lookup

#wait_for_elements

Methods inherited from Page

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

Methods included from Page_Helpers

#set_line

Methods inherited from Common_Object

#set_functions

Methods included from Helpers

#browser, #load_yml, #set_element, #set_function

Constructor Details

#initialize(ole_session) ⇒ Patron_Lookup

Returns a new instance of Patron_Lookup.



18
19
20
21
22
23
# File 'lib/olels/pages/patron_lookup.rb', line 18

def initialize(ole_session)
  url = ole_session.url + 'portal.do?channelTitle=Patron&channelUrl='
  url += ole_session.url + 'ole-kr-krad/lookup?methodToCall=start&dataObjectClassName=org.kuali.ole.deliver.bo.OlePatronDocument&returnLocation='
  url += ole_session.url + 'portal.do&hideReturnLink=true&showMaintenanceLinks=true'
  super(ole_session, url)
end

Instance Method Details

#set_elementsObject

Set Patron Lookup elements.



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/olels/pages/patron_lookup.rb', line 26

def set_elements
  super
  element(:patron_id_field)                 {b.text_field(:id => "olePatronId_control")}
  element(:barcode_field)                   {b.text_field(:id => "barcode_control")}
  element(:first_name_field)                {b.text_field(:id => "firstName_control")}
  element(:last_name_field)                 {b.text_field(:id => "lastName_control")}
  element(:borrower_type_selector)          {b.select_list(:id => "borrowerType_control")}
  element(:email_address_field)             {b.text_field(:id => "emailAddress_control")}
  # Search Controls
  # TODO Move these elements to OLE_QA::Framework::OLELS::Lookup (common) when they become universal.
  element(:active_yes_button)               {b.radio(:id => 'activeIndicator_control_0')}
  element(:active_no_button)                {b.radio(:id => 'activeIndicator_control_1')}
  element(:active_both_button)              {b.radio(:id => 'activeIndicator_control_2')}
  element(:search_button)                   {b.button(:text => "Search")}
  element(:clear_button)                    {b.button(:text => "Clear Values")}
  element(:cancel_button)                   {b.button(:text => "Cancel")}
end