Class: OLE_QA::Framework::OLELS::Batch_Profile

Inherits:
Page show all
Defined in:
lib/olels/common/batch_profile.rb

Overview

The base Batch Process Profile Page in the OLE Library System

Instance Attribute Summary

Attributes inherited from Page

#lines, #url, #wait_on

Attributes inherited from Common_Object

#elements, #functions, #ole

Instance Method Summary collapse

Methods inherited from Page

#lookup, #lookup_url, #open, #set_functions, #set_line, #wait_for_element, #wait_for_page_to_load

Methods inherited from Common_Object

#set_functions

Methods included from Helpers

#browser, #load_yml, #set_element, #set_function

Constructor Details

#initialize(ole_session) ⇒ Batch_Profile

Linking directly with a ‘create new’ link returns a stacktrace or HTTP 500.

The link included in the :url attribute is for the lookup screen.


20
21
22
23
24
25
# File 'lib/olels/common/batch_profile.rb', line 20

def initialize(ole_session)
  url = ole_session.url + 'portal.do?channelTitle=Batch Process Profile&channelUrl='
  url += ole_session.url + 'ole-kr-krad/lookup?methodToCall=start&dataObjectClassName=org.kuali.ole.batch.bo.OLEBatchProcessProfileBo&returnLocation='
  url += ole_session.url + 'portal.do&hideReturnLink=true&showMaintenanceLinks=true'
  super(ole_session, url)
end

Instance Method Details

#set_elementsObject



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/olels/common/batch_profile.rb', line 27

def set_elements
  super
  element(:title)                                 {b.h1(:class => 'uif-headerText').span(:class => 'uif-headerText-span')}
  element(:description_field)                     {b.text_field(:xpath => "//tr/th[descendant::label[contains(text(),'Description:')]]/following-sibling::td[1]/descendant::input[1]")}
  element(:explanation_field)                     {b.text_field(:xpath => "//tr/th[descendant::label[contains(text(),'Explanation:')]]/following-sibling::td[1]/descendant::textarea[1]")}
  element(:org_doc_number_field)                  {b.text_field(:xpath => "//tr/th[descendant::label[contains(text(),'Organization Document Number:')]]/following-sibling::td[1]/descendant::input[1]")}
  element(:document_id)                           {b.div(:data_label => 'Document Number')}
  element(:initiator_id)                          {b.div(:data_label => 'Initiator Network Id')}
  element(:document_status)                       {b.div(:data_label => 'Document Status')}
  element(:creation_timestamp)                    {b.div(:data_label => 'Creation Timestamp')}
  element(:batch_profile_name_field)              {b.text_field(:id => 'mainSection-MaintenanceView-batchProcessProfileName_control')}
  element(:batch_process_type_field)              {b.text_field(:id => 'mainSection-MaintenanceView-batchProcessProfileType_control')}
  element(:batch_process_type_icon)               {batch_process_type_field.parent.input(:index => 1)}
  element(:submit_button)                         {b.button(:text => 'submit')}
  element(:save_button)                           {b.button(:id => 'usave')}
  element(:cancel_button)                         {b.a(:id => 'ucancel')}
  element(:approve_button)                        {b.button(:text => /([Bb]lanket )?[Aa]pprove/)}
  element(:message)                               {b.li(:class => 'uif-infoMessageItem')}
  element(:messages)                              {b.lis(:class => 'uif-infoMessageItem')}
end

#wait_for_elementsObject



48
49
50
51
52
# File 'lib/olels/common/batch_profile.rb', line 48

def wait_for_elements
  super
  @wait_on << :batch_profile_name_field
  @wait_on << :save_button
end