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

Direct Known Subclasses

Batch_Export_Profile, Batch_Import_Profile

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, #set_functions, #wait_for_element, #wait_for_page_to_load

Methods included from Page_Helpers

#set_line

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
# 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.span(:xpath => "//table[@class='uif-gridLayout']/descendant::th[span/label[contains(text(),'Document Number:')]]/following-sibling::td[1]/div/span")}
  element(:initiator_id)                          {b.span(:xpath => "//table[@class='uif-gridLayout']/descendant::th[span/label[contains(text(),'Initiator Network Id:')]]/following-sibling::td[1]/div/span")}
  element(:document_status)                       {b.span(:xpath => "//table[@class='uif-gridLayout']/descendant::th[span/label[contains(text(),'Document Status:')]]/following-sibling::td[1]/div/span")}
  element(:creation_timestamp)                    {b.span(:xpath => "//table[@class='uif-gridLayout']/descendant::th[span/label[contains(text(),'Creation Timestamp:')]]/following-sibling::td[1]/div/span")}
  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 => 2)}
  element(:submit_button)                         {b.button(:text => 'submit')}
  element(:save_button)                           {b.button(:id => 'usave')}
  element(:close_button)                          {b.button(:id => 'uclose')}
  element(:cancel_button)                         {b.a(:id => 'ucancel')}
end

#wait_for_elementsObject



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

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