Class: OLE_QA::Framework::OLELS::Batch_Job_Details

Inherits:
Page show all
Defined in:
lib/olels/pages/batch_job_details.rb

Instance Attribute Summary

Attributes inherited from Page

#lines, #url

Attributes inherited from Common_Object

#elements, #functions, #ole

Instance Method Summary collapse

Methods inherited from Page

#lookup, #lookup_url, #open, #wait_for_element, #wait_for_page_to_load

Methods included from Page_Helpers

#set_line

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.



18
19
20
21
22
# File 'lib/olels/pages/batch_job_details.rb', line 18

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_elementsObject



24
25
26
27
28
29
30
# File 'lib/olels/pages/batch_job_details.rb', line 24

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_functionsObject



37
38
39
40
41
42
43
44
45
46
# File 'lib/olels/pages/batch_job_details.rb', line 37

def set_functions
  super
  # Check whether the given text exists within the job details results displayed.
  function(:text_in_results)                  {|text| b.td(:xpath => "//table/tbody/tr/td[div/span[contains(text(),'#{text}')]]")}
  # 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.button(:xpath=>"//table/tbody/tr[td/div/span[contains(text(),'#{text}')]]/td/div/fieldset/div/div/button[contains(text(),'Remove')]")}
  # 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_elementsObject



32
33
34
35
# File 'lib/olels/pages/batch_job_details.rb', line 32

def wait_for_elements
  super
  @wait_on << :title
end