Class: OLE_QA::Framework::OLELS::Batch_Profile_Lookup
- Inherits:
-
Lookup
- Object
- Common_Object
- Page
- Lookup
- OLE_QA::Framework::OLELS::Batch_Profile_Lookup
- Defined in:
- lib/olels/pages/batch_profile_lookup.rb
Overview
The Batch Process Profile Lookup Screen in the OLE Library System
Instance Attribute Summary
Attributes inherited from Page
Attributes inherited from Common_Object
Instance Method Summary collapse
-
#initialize(ole_session) ⇒ Batch_Profile_Lookup
constructor
A new instance of Batch_Profile_Lookup.
- #set_elements ⇒ Object
- #set_functions ⇒ Object
- #wait_for_elements ⇒ Object
Methods inherited from Page
#lookup, #lookup_url, #open, #wait_for_element, #wait_for_page_to_load
Methods included from Page_Helpers
Methods included from Helpers
#browser, #load_yml, #set_element, #set_function
Constructor Details
#initialize(ole_session) ⇒ Batch_Profile_Lookup
Returns a new instance of Batch_Profile_Lookup.
18 19 20 21 22 23 |
# File 'lib/olels/pages/batch_profile_lookup.rb', line 18 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_elements ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/olels/pages/batch_profile_lookup.rb', line 25 def set_elements super element(:create_new) {b.link(:text => 'Create New')} element(:profile_name_field) {b.text_field(:id => 'lookup-batchProcessProfileName_control')} element(:profile_description_field) {b.text_field(:id => 'lookup-batchProcessProfileDesc_control')} element(:profile_type_selector) {b.select_list(:id => 'lookup-batchProcessProfileType_control')} element(:krms_profile_selector) {b.select_list(:id => 'lookup-krmsProfileName_control')} element(:search_button) {b.(:id => 'searchReqBtn')} element(:clear_button) {b.(:id => 'clearReqBtn')} element(:cancel_button) {b.(:id => 'cancelReqBtn')} end |
#set_functions ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/olels/pages/batch_profile_lookup.rb', line 43 def set_functions super # Check whether the given text exists within the search results displayed. function(:text_in_results) {|text| b.td(:xpath => "//table/tbody/tr/td[div/span[contains(text(),'#{text}')]]")} # Return the 'Edit' link for a row containing the given text. function(:edit_by_text) {|text| b.a(:xpath => "//table/tbody/tr[td/div/span[contains(text(),'#{text}')]]/td[1]/div/fieldset/div/a[contains(text(),'edit')]")} # Return the Batch Process Profile ID link for a row containing the given text. function(:id_by_text) {|text| b.a(:xpath => "//table/tbody/tr[td/div/span[contains(text(),'#{text}')]]/td[2]/div/span/a")} # Return the value of the Batch Process Profile containing the given text. # @note Replaces :edit_by_text when the lookup is embedded on a batch profile editing screen. function(:return_by_text) {|text| b.a(:xpath => "//table/tbody/tr[td/div/span[contains(text(),'#{text}')]]/td/div/a[contains(text(),'return value')]")} end |
#wait_for_elements ⇒ Object
37 38 39 40 41 |
# File 'lib/olels/pages/batch_profile_lookup.rb', line 37 def wait_for_elements super @wait_on << :profile_name_field @wait_on << :search_button end |