Class: OLE_QA::Framework::OLELS::Location
- Inherits:
-
E_Doc
- Object
- Common_Object
- Page
- E_Doc
- OLE_QA::Framework::OLELS::Location
- Defined in:
- lib/olels/pages/location.rb
Overview
The view/edit page for Location in the OLE Library System
Instance Attribute Summary
Attributes inherited from Page
Attributes inherited from Common_Object
Instance Method Summary collapse
-
#initialize(ole_session) ⇒ Location
constructor
A new instance of Location.
- #set_elements ⇒ Object
- #set_functions ⇒ Object
- #wait_for_elements ⇒ Object
Methods inherited from Page
#lookup, #lookup_url, #open, #set_line, #wait_for_element, #wait_for_page_to_load
Methods included from Helpers
#browser, #load_yml, #set_element, #set_function
Constructor Details
#initialize(ole_session) ⇒ Location
Returns a new instance of Location.
18 19 20 21 22 23 |
# File 'lib/olels/pages/location.rb', line 18 def initialize(ole_session) url = ole_session.url + 'portal.do?channelTitle=Location &channelUrl=' url += ole_session.url + 'ole-kr-krad/lookup?methodToCall=start&dataObjectClassName=org.kuali.ole.describe.bo.OleLocation&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 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/olels/pages/location.rb', line 25 def set_elements super element(:document_id, true) {b.span(:id => 'Uif-OleDocumentNumber_control')} element(:initiator_id, true) {b.span(:id => 'Uif-OleDocumentInitiatorNetworkId_control')} element(:document_status, true) {b.span(:id => 'Uif-OleDocumentStatus_control')} element(:creation_timestamp, true) {b.span(:id => 'Uif-OleDocumentCreateDate_control')} element(:error_message) {b.ul(:id => 'pageValidationList').li(:class => 'uif-errorMessageItem')} element(:message) {b.ul(:id => 'pageValidationList').li(:class => 'uif-infoMessageItem')} element(:location_code_field) {b.text_field(:id => 'create_locationCode_control')} element(:location_name_field) {b.text_field(:id => 'create_locationName_control')} element(:location_level_field) {b.text_field(:id => 'create_levelId_control')} element(:location_level_icon) {b.input(:title => 'Search Field', :index => 0)} element(:parent_location_selector) {b.select_list(:id => 'create_parentLocationId_control')} element(:parent_location_icon) {b.input(:title => 'Search Field', :index => 1)} element(:submit_button) {b.(:id => 'oleSubmit')} element(:save_button) {b.(:id => 'usave')} element(:blanket_approve_button) {b.(:id => 'oleBlanketApprove')} element(:back_button) {b.(:id => 'oleClose')} element(:close_button) {} element(:cancel_link) {b.a(:id => 'ucancel')} end |
#set_functions ⇒ Object
47 48 49 50 51 52 53 54 |
# File 'lib/olels/pages/location.rb', line 47 def set_functions super # Submit the document, and when the outcome message is present, check for success. function(:submit) { .when_present.click wait_for_page_to_load Watir::Wait.until { .present? || .present? } .present? && .text.include?('successfully submitted') ? true : false } end |
#wait_for_elements ⇒ Object
56 57 58 59 60 |
# File 'lib/olels/pages/location.rb', line 56 def wait_for_elements super @wait_on << :location_code_field @wait_on << :parent_location_selector end |