Class: OLE_QA::Framework::OLELS::Return
- Inherits:
-
Page
- Object
- Common_Object
- Page
- OLE_QA::Framework::OLELS::Return
- Defined in:
- lib/olels/pages/return.rb
Overview
The Return page in the OLE Library System.
Instance Attribute Summary
Attributes inherited from Page
Attributes inherited from Common_Object
Instance Method Summary collapse
-
#initialize(ole_session) ⇒ Return
constructor
A new instance of Return.
-
#set_elements ⇒ Object
Set elements for return page.
-
#set_functions ⇒ Object
Set commonly used functions on return page.
-
#wait_for_elements ⇒ Object
Wait for the loan button and item barcode field to be present.
Methods inherited from Page
#lookup, #lookup_url, #open, #set_line, #wait_for_element, #wait_for_page_to_load
Methods included from Helpers
#browser, #load_yml, #set_element, #set_function
Constructor Details
#initialize(ole_session) ⇒ Return
Returns a new instance of Return.
18 19 20 21 22 |
# 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 |
Instance Method Details
#set_elements ⇒ Object
Set elements for return page.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/olels/pages/return.rb', line 25 def set_elements super # General Elements element(:loan_button) {b.(:id => 'LoanScreenLinkView-buttons')} element(:end_session_button) {b.(: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.(:id => 'returnBtn')} element(:do_not_return_button) {b.(:id => 'noReturnBtn')} # Circulation desk elements element(:circulation_desk_selector) {b.select_list(:id => 'LoanCirculationDesk_control')} element(:circulation_desk_yes) {b.(:id => 'ChangeCirculationLocationBtn')} element(:circulation_desk_no) {b.(:id => 'CirculationLocationCloseBtn')} end |
#set_functions ⇒ Object
Set commonly used functions on return page.
54 55 56 57 58 59 60 61 62 63 64 |
# 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 ⇒ Object
Wait for the loan button and item barcode field to be present.
48 49 50 51 |
# File 'lib/olels/pages/return.rb', line 48 def wait_for_elements @wait_on << :loan_button @wait_on << :item_field end |