class OLE_QA::Framework::OLELS::Return
The Return
page in the OLE Library System.
Public Class Methods
new(ole_session)
click to toggle source
Calls superclass method
OLE_QA::Framework::Page::new
# File lib/olels/pages/return.rb, line 18 def initialize(ole_session) url = ole_session.url + 'portal.do?channelTitle=Loan&channelUrl=' url += ole_session.url + 'ole-kr-krad/loancontroller?viewId=ReturnItemView&methodToCall=start' super(ole_session, url) end
Public Instance Methods
set_elements()
click to toggle source
Set elements for return page.
Calls superclass method
OLE_QA::Framework::Page#set_elements
# File lib/olels/pages/return.rb, line 25 def set_elements super # General Elements element(:loan_button) {b.button(:id => 'LoanScreenLinkView-buttons')} element(:end_session_button) {b.button(:id => 'endSessionButton')} # Checkin Elements element(:damaged_checkin_checkbox) {b.checkbox(:id => 'DamagedCheckIn_control')} element(:checkin_date_field) {b.text_field(:id => 'CheckInDate_control')} element(:checkin_time_field) {b.text_field(:id => 'CheckInTime_control')} element(:item_field) {b.text_field(:id => 'CheckInItem_control')} element(:item_search_button) {b.fieldset(:id => 'CheckInItem_fieldset').input(:title => 'Search Field')} element(:items_returned_toggle) {b.a(:id => 'ItemReturnedList-HorizontalBoxSection_toggle')} # Checkin Message Elements element(:checkin_message_box) {b.div(:id => 'MessagePopupSectionForReturn')} element(:return_button) {b.button(:id => 'returnBtn')} element(:do_not_return_button) {b.button(:id => 'noReturnBtn')} # Circulation desk elements element(:circulation_desk_selector) {b.select_list(:id => 'LoanCirculationDesk_control')} element(:circulation_desk_yes) {b.button(:id => 'ChangeCirculationLocationBtn')} element(:circulation_desk_no) {b.button(:id => 'CirculationLocationCloseBtn')} end
set_functions()
click to toggle source
Set commonly used functions on return page.
Calls superclass method
OLE_QA::Framework::Page#set_functions
# File lib/olels/pages/return.rb, line 54 def set_functions super function(:item_barcode_link) {|which = 1| b.div(:id => "returnBarcode_line#{which-1}").a} function(:item_title) {|which = 1| b.span(:id => "returnTitle_line#{which-1}_control")} function(:item_author) {|which = 1| b.span(:id => "returnAuthor_line#{which-1}_control")} function(:item_location) {|which = 1| b.span(:id => "returnItemLocation_line#{which-1}_control")} function(:item_call_number) {|which = 1| b.span(:id => "returnItemCallNumber_line#{which-1}_control")} function(:item_checkin_date) {|which = 1| b.span(:id => "returnCheckInDate_line#{which-1}_control")} function(:item_status) {|which = 1| b.span(:id => "returnItemStatus_line#{which-1}_control")} function(:item_bill_link) {|which = 1| b.div(:id => "returnBill_line#{which-1}").a} end
wait_for_elements()
click to toggle source
Wait for the loan button and item barcode field to be present.
# File lib/olels/pages/return.rb, line 48 def wait_for_elements @wait_on << :loan_button @wait_on << :item_field end