Class: OLE_QA::Framework::OLELS::Batch_Job_Details
- Inherits:
-
Page
- Object
- Common_Object
- Page
- OLE_QA::Framework::OLELS::Batch_Job_Details
- Defined in:
- lib/olels/pages/batch_job_details.rb
Overview
Note:
This page refreshes about once a minute while open.
The Batch Process Job Details page in OLE.
Instance Attribute Summary
Attributes inherited from Page
Attributes inherited from Common_Object
Instance Method Summary collapse
-
#initialize(ole_session) ⇒ Batch_Job_Details
constructor
A new instance of Batch_Job_Details.
- #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) ⇒ Batch_Job_Details
Returns a new instance of Batch_Job_Details.
19 20 21 22 23 |
# File 'lib/olels/pages/batch_job_details.rb', line 19 def initialize(ole_session) url = ole_session.url + 'portal.do?channelTitle=Batch Process Job Details&channelUrl=' url += ole_session.url + 'ole-kr-krad/oleBatchProcessJobController?viewId=OLEBatchProcessJobDetailsView&methodToCall=jobDocHandler&command=initiate&documentClass=org.kuali.ole.batch.bo.OLEBatchProcessJobDetailsBo' super(ole_session, url) end |
Instance Method Details
#set_elements ⇒ Object
25 26 27 28 29 30 31 |
# File 'lib/olels/pages/batch_job_details.rb', line 25 def set_elements super element(:title) {b.span(:class => 'uif-headerText-span')} element(:next_page) {b.a(:text => 'Next')} element(:previous_page) {b.a(:text => 'Previous')} element(:entries_selector) {b.b.div(:id => 'OLEBatchProcessJobDetailsView-listOfItems_disclosureContent').div(:index => 1).div(:index => 0).label(:index => 0).select_list(:index => 0)} end |
#set_functions ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/olels/pages/batch_job_details.rb', line 38 def set_functions super # If the given text appears in any of the result TDs, return that element. function(:text_in_results) {|text| b.td(:xpath => "//table/tbody/tr/td[div/span[contains(text(),'#{text}')]]")} # Return true or false depending on whether or not the text is found in the search results. function(:text_in_results?) {|text| text_in_results(text).present?} # Return the 'Remove' button for a row containing the given text. # @note This could be dangerous with the wrong selection text. Use this function carefully! function(:remove_by_text) {|text| b.(:xpath=>"//table/tbody/tr[td/div/span[contains(text(),'#{text}')]]/td/div/fieldset/div/div/button[contains(text(),'Remove')]")} # Return the Job Status span for a row containing the given text. function(:job_status_by_text) {|text| b.span(:xpath => "//table/tbody/tr[td/div/span[contains(text(),'#{text}')]]/td/div/span[starts-with(@id,'statusField_line')]")} # Return the 'View Job Report' link for a row containing the given text. function(:job_report_by_text) {|text| b.a(:xpath => "//table/tbody/tr[td/div/span[contains(text(),'#{text}')]]/td/div/fieldset/div/div/div/a[contains(text(),'View Job Report')]")} end |
#wait_for_elements ⇒ Object
33 34 35 36 |
# File 'lib/olels/pages/batch_job_details.rb', line 33 def wait_for_elements super @wait_on << :title end |