Class: OLE_QA::Framework::OLEFS::Purchase_Order
- Inherits:
-
PURAP_Document
- Object
- Common_Object
- Page
- E_Doc
- PURAP_Document
- OLE_QA::Framework::OLEFS::Purchase_Order
- Defined in:
- lib/olefs/pages/purchase_order.rb
Overview
An OLE Financial System Purchase Order
-
Many screen elements are identical to those of a Requisition
-
Line Item handling is identical to that of a Requisition
Instance Attribute Summary
Attributes inherited from Page
Attributes inherited from Common_Object
Instance Method Summary collapse
- #create_line_item(which = 1) ⇒ Object (also: #add_line_item)
-
#initialize(ole_session) ⇒ Purchase_Order
constructor
Initialize with a URL of OLE_QA::Framework::Session.url.
- #remove_line_item(which = 1) ⇒ Object (also: #delete_line_item)
-
#set_elements ⇒ Object
Set Purchase Order screen elements.
-
#set_lines ⇒ Object
Create a new line item object on the purchase order.
Methods inherited from PURAP_Document
Methods inherited from E_Doc
#get_error_array, #wait_for_elements
Methods inherited from Page
#open, #set_functions, #wait_for_element, #wait_for_elements, #wait_for_page_to_load
Methods inherited from Common_Object
Methods included from Helpers
#browser, #load_yml, #set_element, #set_function
Constructor Details
#initialize(ole_session) ⇒ Purchase_Order
Note:
OLEFS Purchase Orders do not have a direct link to open new documents.
Initialize with a URL of OLE_QA::Framework::Session.url
22 23 24 |
# File 'lib/olefs/pages/purchase_order.rb', line 22 def initialize(ole_session) super(ole_session, ole_session.url) end |
Instance Method Details
#create_line_item(which = 1) ⇒ Object Also known as: add_line_item
58 59 60 |
# File 'lib/olefs/pages/purchase_order.rb', line 58 def create_line_item(which = 1) create_line("line_item_#{which}","Line_Item", which) end |
#remove_line_item(which = 1) ⇒ Object Also known as: delete_line_item
63 64 65 |
# File 'lib/olefs/pages/purchase_order.rb', line 63 def remove_line_item(which = 1) remove_line("line_item_#{which}") end |
#set_elements ⇒ Object
Set Purchase Order screen elements.
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 |
# File 'lib/olefs/pages/purchase_order.rb', line 32 def set_elements super # Purchase Order Detail Area element(:funding_source_selector) {b.select_list(:id => "document.documentFundingSourceCode")} # Additional Institutional Info Tab element(:additional_info_tab_toggle) {b.input(:id => "tab-AdditionalInstitutionalInfo-imageToggle")} element(:additional_info_phone_number_field) {b.text_field(:id => "document.requestorPersonPhoneNumber")} # Delivery Tab element(:room_field) {b.text_field(:id => "document.deliveryBuildingRoomNumber")} element(:building_search_icon) {b.input(:xpath => "//div[@id='tab-Delivery-div']/descendant::tr[2]/th[1]/following-sibling::td[1]/input[1]")} element(:campus_search_icon) {b.input(:xpath => "//div[@id='tab-Delivery-div']/descendant::tr[1]/th[1]/following-sibling::td[1]/input[1]")} element(:delivery_phone_number_field) {b.text_field(:id => "document.deliveryToPhoneNumber")} # Vendor Tab element(:vendor_name_field) {b.text_field(:id => "document.vendorName")} element(:vendor_search_icon) {b.input(:xpath => "//input[@id='document.vendorName']/following-sibling::input[1]")} # Titles Tab element(:grand_total_field) {b.b(:xpath => "//div[@id='tab-Titles-div']/descendant::th[div[contains(text(),'Grand Total')]]/following-sibling::td/div/b")} # Input Buttons element(:sensitive_data_button) {b.input(:xpath => "//input[@title='Assign sensitive data to the PO']")} element(:payment_hold_button) {b.input(:xpath => "//input[@title='Payment Hold']")} element(:amend_button) {b.input(:xpath => "//input[@title='Amend']")} element(:void_order_button) {b.input(:xpath => "//input[@title='Void PO']")} element(:receiving_button) {b.input(:xpath => "//input[@title='Receiving']")} element(:print_button) {b.input(:xpath => "//input[@title='Print']")} end |
#set_lines ⇒ Object
Create a new line item object on the purchase order.
27 28 29 |
# File 'lib/olefs/pages/purchase_order.rb', line 27 def set_lines create_line("new_line_item", "New_Line_Item") end |