class OLE_QA::Framework::OLEFS::E_Doc
This class contains element definitions common to OLE Financial System E-Docs. Element definitions are stored in lib/olefs/e_doc/elements.yml
Public Instance Methods
get_error_array()
click to toggle source
Returns an array of both “Errors in this Section” messages and individual error messages from each section.
# File lib/olefs/common/e_doc.rb, line 68 def get_error_array error_array = Array.new self.errors_in_tab.each do |error_in_tab| error_array << error_in_tab error_in_tab.parent.divs.each do |error| error_array << error end end error_array end
set_elements()
click to toggle source
Automatically set element definitions on the E-Document object. @note This method is automagically invoked on any Page
object. (see {OLE_QA::Framework::OLEFS::Page#initialize})
Calls superclass method
OLE_QA::Framework::Page#set_elements
# File lib/olefs/common/e_doc.rb, line 22 def set_elements super # General Info element(:title) {b.div(:id => 'headerarea').h1} # Header Area element(:document_id) {b.th(:text => /Doc Nbr\:/).parent.td(:index => 0)} element(:document_status) {b.th(:text => /Status\:/).parent.td(:index => 1)} element(:document_type_id) {b.table(:class => 'headerinfo').tbody.tr(:index => 2).td(:index => 0)} element(:document_type_status) {b.table(:class => 'headerinfo').tbody.tr(:index => 2).td(:index => 1)} element(:document_create_date) {b.table(:class => 'headerinfo').tbody.tr(:index => 1).td(:index => 1)} # Document Overview element(:document_overview_tab_toggle) {b.input(:id => 'tab-DocumentOverview-imageToggle')} element(:description_field) {b.text_field(:id => 'document.documentHeader.documentDescription')} element(:explanation_field) {b.text_field(:id => 'document.documentHeader.explanation')} # Global Input Buttons element(:approve_button) {b.div(:id => 'globalbuttons').input(:title => 'blanket approve')} element(:save_button) {b.div(:id => 'globalbuttons').input(:title => 'save')} element(:submit_button) {b.div(:id => 'globalbuttons').input(:title => 'submit')} element(:calculate_button) {b.div(:id => 'globalbuttons').input(:title => 'Calculate')} element(:close_button) {b.div(:id => 'globalbuttons').input(:title => 'close')} element(:cancel_button) {b.div(:id => 'globalbuttons').input(:title => 'cancel')} element(:copy_button) {b.div(:id => 'globalbuttons').input(:title => 'Copy current document')} element(:send_ad_hoc_button) {b.div(:id => 'globalbuttons').input(:title => 'Send AdHoc Requests')} element(:reload_button) {b.div(:id => 'globalbuttons').input(:title => 'reload')} # Confirmation Screen Buttons element(:close_yes_button) {b.div(:id => 'globalbuttons').input(:name => 'methodToCall.processAnswer.button0')} element(:close_no_button) {b.div(:id => 'globalbuttons').input(:name => 'methodToCall.processAnswer.button1')} element(:cancel_yes_button) {b.div(:id => 'globalbuttons').input(:name => 'methodToCall.processAnswer.button0')} element(:cancel_no_button) {b.div(:id => 'globalbuttons').input(:name => 'methodToCall.processAnswer.button1')} # Messages element(:save_message) {b.div(:class => 'left-errmsg').div(:text => /Document was successfully saved\./)} element(:submit_message) {b.div(:class => 'left-errmsg').div(:text => /Document was successfully submitted\./)} element(:error_message) {b.div(:class => 'left-errmsg').div(:class => 'error', :text => /error/, :text => /found on page/)} element(:generic_message) {b.div(:class => 'left-errmsg').div} # Multiple Error Message Components Watir::HTMLElementCollection element(:errors_in_tab) {b.strongs(:text => /Errors found in this Section\:/)} end
wait_for_elements()
click to toggle source
Wait for the following elements to be loaded when opening an E-Document page.
Calls superclass method
OLE_QA::Framework::Page#wait_for_elements
# File lib/olefs/common/e_doc.rb, line 61 def wait_for_elements @wait_on << :title @wait_on << :document_id super end