Class: OLE_QA::Framework::OLELS::Staff_Upload
- Inherits:
-
Page
- Object
- Common_Object
- Page
- OLE_QA::Framework::OLELS::Staff_Upload
- Defined in:
- lib/olels/pages/staff_upload.rb
Overview
The OLE Library System Staff Upload page, accessible from the OLE Financial System main menu.
Instance Attribute Summary
Attributes inherited from Page
Attributes inherited from Common_Object
Instance Method Summary collapse
-
#initialize(ole_session) ⇒ Staff_Upload
constructor
A new instance of Staff_Upload.
-
#set_elements ⇒ Object
Set elements for Staff upload screen.
-
#set_functions ⇒ Object
Add commonly-used functions for staff upload screen.
-
#wait_for_elements ⇒ Object
Wait for title to appear.
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) ⇒ Staff_Upload
Returns a new instance of Staff_Upload.
19 20 21 22 23 |
# File 'lib/olels/pages/staff_upload.rb', line 19 def initialize(ole_session) url = ole_session.url + 'portal.do?channelTitle=Staff%20Upload&channelUrl=' url += ole_session.url + 'ole-kr-krad/staffuploadcontroller?viewId=StaffUploadView&methodToCall=start&__login_user=admin&user=ole-khuntley' super(ole_session, url) end |
Instance Method Details
#set_elements ⇒ Object
Set elements for Staff upload screen.
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/olels/pages/staff_upload.rb', line 26 def set_elements super element(:title) {browser.h1(:class => 'uif-headerText').span} element(:marc_field) {browser.input(:id => "StaffUploadView-marcFileUpload_control").to_subtype} element(:edi_field) {browser.input(:id => "StaffUploadView-ediFileUpload_control").to_subtype} element(:profile_selector) {browser.select_list(:id => "StaffUploadView-agenda_control")} element(:description_field) {browser.input(:id => "StaffUploadView-agendaDescription_control").to_subtype} element(:upload_button) {browser.(:id => "uploadButton")} element(:cancel_button) {browser.(:id => "cancelButton")} element(:load_reports_button) {browser.(:id => "loadReportsButton")} element(:message) {browser.div(:id => 'MessageFieldSection').span} end |
#set_functions ⇒ Object
Add commonly-used functions for staff upload screen.
46 47 48 49 50 51 |
# File 'lib/olels/pages/staff_upload.rb', line 46 def set_functions super # Clicks the upload button and waits for a message to appear. # - Returns the text of the upload message. function(:upload) {.click ; wait_for_page_to_load ; .when_present.text.strip } end |
#wait_for_elements ⇒ Object
Wait for title to appear.
40 41 42 43 |
# File 'lib/olels/pages/staff_upload.rb', line 40 def wait_for_elements @wait_on << :title super end |