Class: OLE_QA::Framework::OLELS::Request_Lookup
- Inherits:
-
Lookup
- Object
- Common_Object
- Page
- Lookup
- OLE_QA::Framework::OLELS::Request_Lookup
- Defined in:
- lib/olels/pages/request_lookup.rb
Overview
The request lookup screen in the OLE Library System.
Instance Attribute Summary
Attributes inherited from Page
Attributes inherited from Common_Object
Instance Method Summary collapse
-
#initialize(ole_session) ⇒ Request_Lookup
constructor
A new instance of Request_Lookup.
- #set_elements ⇒ Object
- #set_functions ⇒ Object
- #wait_for_elements ⇒ Object
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) ⇒ Request_Lookup
Returns a new instance of Request_Lookup.
18 19 20 21 22 23 |
# File 'lib/olels/pages/request_lookup.rb', line 18 def initialize(ole_session) url = ole_session.url + 'portal.do?channelTitle=Request&channelUrl=' url += ole_session.url + 'ole-kr-krad/lookup?methodToCall=start&dataObjectClassName=org.kuali.ole.deliver.bo.OleDeliverRequestBo&returnLocation=' url += ole_session.url + 'portal.do&hideReturnLink=true&showMaintenanceLinks=true' super(ole_session,url) end |
Instance Method Details
#set_elements ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/olels/pages/request_lookup.rb', line 25 def set_elements super element(:patron_barcode_field) {b.text_field(:id => 'olePatronBarcode_control')} element(:patron_barcode_icon) {b.fieldset(:id => 'olePatronBarcode_fieldset').input(:class => 'uif-actionImage')} element(:patron_first_name_field) {b.text_field(:id => 'olePatronFName_control')} element(:patron_last_name_field) {b.text_field(:id => 'olePatronLName_control')} element(:item_barcode_field) {b.text_field(:id => 'itemId_control')} element(:item_barcode_icon) {b.fieldset(:id => 'itemId_fieldset').input(:class => 'uif-actionImage')} element(:item_title_field) {b.text_field(:id => 'title_control')} element(:search_button) {b.(:id => 'searchReqBtn')} element(:clear_button) {b.(:id => 'clearReqBtn')} element(:cancel_button) {b.(:id => 'cancelReqBtn')} element(:message) {b.li(:class => 'uif-infoMessageItem')} end |
#set_functions ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/olels/pages/request_lookup.rb', line 46 def set_functions super # Return the span element containing the given text, if it exists in the search results. function(:text_in_results) {|which| b.span(:xpath => "//td/div/span[contains(text(),'#{which}')]")} # Return whether the given text is found in the search results. function(:text_in_results?) {|which| text_in_results(which).present?} # Return the cancel request link for a line containing the given text in the search results. function(:cancel_by_text) {|which| b.a(:xpath => "//tr/td[div/span[contains(text(),'#{which}')]]/preceding-sibling::td/div/fieldset/div/div/a[contains(text(),'cancel')]")} # Return the edit request link for a line containing the given text in the search results. function(:edit_by_text) {|which| b.a(:xpath => "//tr/td[div/span[contains(text(),'#{which}')]]/preceding-sibling::td/div/fieldset/div/div/a[contains(text(),'edit')]")} # Return the text of the Queue Position entry for a line containing the given text. function(:position_by_text) {|which| b.span(:xpath => "//tr/td[div/span[contains(text(),'#{which}')]]/preceding-sibling::td/div/span[starts-with(@id,'result-borrowerQueuePosition_line')]").text} end |
#wait_for_elements ⇒ Object
40 41 42 43 44 |
# File 'lib/olels/pages/request_lookup.rb', line 40 def wait_for_elements super @wait_on << :patron_barcode_field << :patron_first_name_field << :patron_last_name_field @wait_on << :item_barcode_field << :item_title_field end |