Class: OLE_QA::Framework::OLEFS::Load_Report
- Inherits:
-
E_Doc
- Object
- Common_Object
- Page
- E_Doc
- OLE_QA::Framework::OLEFS::Load_Report
- Defined in:
- lib/olefs/pages/load_report.rb
Overview
An OLE Financial System staff upload load report.
Instance Attribute Summary
Attributes inherited from Page
Attributes inherited from Common_Object
Instance Method Summary collapse
-
#initialize(ole_session) ⇒ Load_Report
constructor
Initializes with Load Summary Lookup URL.
-
#set_elements ⇒ Object
Set load report screen elements.
- #set_functions ⇒ Object
- #wait_for_elements ⇒ Object
Methods inherited from E_Doc
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) ⇒ Load_Report
Initializes with Load Summary Lookup URL.
(Requires document ID number to retrieve by URL.)
20 21 22 23 24 25 |
# File 'lib/olefs/pages/load_report.rb', line 20 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' lookup_url = "acqBatchUpload.do?docId=_DOC_ID_&docTypeName=OLE_ACQBTHUPLOAD&methodToCall=docHandler&command=displayDocSearchView#topOfForm" super(ole_session, url, lookup_url) end |
Instance Method Details
#set_elements ⇒ Object
Set load report screen elements.
28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/olefs/pages/load_report.rb', line 28 def set_elements super element(:profile_name) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'Name Of Load Profile')]]/following-sibling::td")} element(:user_id) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'User ID')]]/following-sibling::td")} element(:counts) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'Counts')]]/following-sibling::td")} element(:file_name) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'Name Of File')]]/following-sibling::td")} element(:number_of_pos) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'No. Of POs Created')]]/following-sibling::td")} element(:number_of_bibs) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'No. Of Bibs Created')]]/following-sibling::td")} element(:po_link) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'List Of All POs')]]/following-sibling::td").a} element(:bib_link) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'List Of All Bibs')]]/following-sibling::td").a} element(:upload_description) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'Description')]]/following-sibling::td")} element(:upload_date) {b.td(:xpath => "//table[@class = 'datatable']/descendant::th[div[contains(text(),'Date Of Load')]]/following-sibling::td")} end |
#set_functions ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/olefs/pages/load_report.rb', line 49 def set_functions super # Total Count from 'Counts' cell. # @return [String] The total number of records uploaded. function(:total_count) {counts.text.match(/(?<=TOTAL\: )\d+(?=\s)/).to_s} # Success Count from 'Counts' cell. # @return [String] The total number of records successfully processed. function(:success_count) {counts.text.match(/(?<=SUCCESS\: )\d+(?=\s)/).to_s} # Failure Count from 'Counts' cell. # @return [String] The total number of records unsuccessfully processed. function(:failure_count) {counts.text.match(/(?<=FAILED\: )\d+(?=$)/).to_s} # Use a regular expression to return the year/month/day value in the upload date field. # @return [String] The upload date, in MM/DD/YYYY format. function(:upload_date_ymd) {upload_date.text.match(/\d{2}\/\d{2}\/\d{4}/)} # Use a regular expression to return the time-of-day value in the upload date field. # @return [String] The upload time, in HH:MM AM/PM format. function(:upload_date_tod) {upload_date.text.match(/\d{2}\:\d{2}\s+[AP]M/)} end |
#wait_for_elements ⇒ Object
42 43 44 45 46 47 |
# File 'lib/olefs/pages/load_report.rb', line 42 def wait_for_elements super @wait_on << :counts @wait_on << :upload_description @wait_on << :upload_date end |