Class: OLE_QA::Framework::OLELS::Batch_Process

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

Overview

The Batch Process control screen 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_Process

Define URL in initialize.



19
20
21
22
23
# File 'lib/olels/pages/batch_process.rb', line 19

def initialize(ole_session)
  url = ole_session.url + 'portal.do?channelTitle=Batch Process&channelUrl='
  url += ole_session.url + 'ole-kr-krad/oleBatchProcessDefinitionController?viewId=OLEBatchProcessDefinitionView&methodToCall=startBatch&command=initiate&documentClass=org.kuali.ole.batch.document.OLEBatchProcessDefinitionDocument'
  super(ole_session, url)
end

Instance Method Details

#set_elementsObject



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/olels/pages/batch_process.rb', line 25

def set_elements
  super
  element(:title)                       {b.h1.span}
  element(:name_field)                  {b.text_field(:id => 'BatchProcessDefinition-batchProcessName_control')}
  element(:profile_name_field)          {b.text_field(:id => 'BatchProcessDefinition-batchProcessProfileName_control')}
  element(:profile_search_icon)         {b.input(:title => 'Search Field')}
  element(:batch_size_field)            {b.text_field(:id => 'chunkSizeField_control')}
  element(:email_field)                 {b.text_field(:id => 'emailField_control')}
  element(:output_format_selector)      {b.select_list(:id => 'outputField_control')}
  element(:output_file_field)           {b.text_field(:id => 'outputFileField_control')}
  element(:input_file_field)            {b.input(:id => 'ingestInputFile_control').to_subtype}
  element(:run_now_option)              {b.radio(:id => 'RunNow_Schedule_control_0')}
  element(:schedule_option)             {b.radio(:id => 'RunNow_Schedule_control_1')}
  element(:marc_file_field)             {b.input(:id => 'marcFileField_control').to_subtype}
  element(:edi_file_field)              {b.input(:id => 'ediFileField_control').to_subtype}
  element(:message)                     {b.li(:class => 'uif-infoMessageItem')}
  # The cron_expression_option and scheduler_option appear after schedule_option is selected.
  element(:cron_expression_option)      {b.radio(:id => 'Schedule-provideCronExp_control_0')}
  element(:scheduler_option)            {b.radio(:id => 'Schedule-provideCronExp_control_1')}
  element(:one_time_option)             {b.radio(:id => 'Schedule-oneTimeOrRecurring_control_0')}
  element(:recurring_option)            {b.radio(:id => 'Schedule-oneTimeOrRecurring_control_1')}
  element(:cron_expression_field)       {b.text_field(:id => 'Schedule-cronExpField_control')}
  element(:schedule_date_field)         {b.text_field(:id => 'Schedule-DateField_control')}
  element(:schedule_time_field)         {b.text_field(:id => 'Schedule-timeField_control')}
  element(:schedule_daily_option)       {b.radio(:id => 'Schedule-RadioButtons_control_0')}
  element(:schedule_weekly_option)      {b.radio(:id => 'Schedule-RadioButtons_control_1')}
  element(:schedule_monthly_option)     {b.radio(:id => 'Schedule-RadioButtons_control_2')}
  element(:schedule_start_time_field)   {b.radio(:id => 'Schedule-startTimeField_control')}
  element(:monday_checkbox)             {b.checkbox(:id => 'weekDaysField_control_0')}
  element(:tuesday_checkbox)            {b.checkbox(:id => 'weekDaysField_control_1')}
  element(:wednesday_checkbox)          {b.checkbox(:id => 'weekDaysField_control_2')}
  element(:thursday_checkbox)           {b.checkbox(:id => 'weekDaysField_control_3')}
  element(:friday_checkbox)             {b.checkbox(:id => 'weekDaysField_control_4')}
  element(:saturday_checkbox)           {b.checkbox(:id => 'weekDaysField_control_5')}
  element(:sunday_checkbox)             {b.checkbox(:id => 'weekDaysField_control_6')}
  element(:day_of_month_selector)       {b.select(:id => 'weekNumberField_control')}
  element(:month_number_field)          {b.text_field(:id => 'monthNumberField_control')}
  # Please note that these buttons will not show up unless a Batch Process Profile is selected.
  #   - JKW, 6/24/2014, 1.5-M2-r19440
  element(:submit_button)               {b.button(:id => 'BP-Uif-SubmitAction')}
  element(:close_button)                {b.button(:id => 'uclose')}
  element(:clear_button)                {b.button(:class => 'btn',:text => /[Cc]lear/)}
  element(:cancel_button)               {b.button(:id => 'ucancel')}
end

#wait_for_elementsObject



70
71
72
73
74
75
# File 'lib/olels/pages/batch_process.rb', line 70

def wait_for_elements
  super
  @wait_on << :title
  @wait_on << :name_field
  @wait_on << :run_now_option
end