Class: OLE_QA::Framework::OLEFS::Notes_Line

Inherits:
Subline_Object show all
Defined in:
lib/olefs/subobjects/notes_line.rb

Overview

A Notes Line in an OLE Financial System PURAP E-Document.

Instance Attribute Summary

Attributes inherited from Subline_Object

#parent_line

Attributes inherited from Line_Object

#line_number, #sublines

Attributes inherited from Common_Object

#elements, #functions, #ole

Instance Method Summary collapse

Methods inherited from Subline_Object

#initialize

Methods inherited from Line_Object

#initialize, #line_id, #set_subline

Methods inherited from Common_Object

#initialize, #set_functions

Methods included from Helpers

#browser, #load_yml, #set_element, #set_function

Constructor Details

This class inherits a constructor from OLE_QA::Framework::Subline_Object

Instance Method Details

#set_elementsObject

Set notes line elements.



19
20
21
22
23
24
25
26
27
# File 'lib/olefs/subobjects/notes_line.rb', line 19

def set_elements
  super
  element(:note_type_selector)            {b.select_list(:id => "document.item[#{@parent_line.line_id}].notes[#{line_id}].noteTypeId")}
  element(:note_field)                    {b.text_field(:id => "document.item[#{@parent_line.line_id}].notes[#{line_id}].note")}
  element(:delete_button)                 {b.input(:name => "methodToCall.deleteNote.line#{@parent_line.line_id}:#{line_id}")}
  # Use the elements below for a closed, inaccessible notes field on a PURAP document like a Purchase Order.
  element(:closed_note_type_field)        {b.td(:xpath => "//tr[starts-with(@id,'tab-Notes')]/th/table[@class = 'datatable']/tbody[1]/tr[td[@class = 'subhead'][contains(text(),'Note #{@line_number}')]]/following-sibling::tr[1]/td[1]")}
  element(:closed_note_field)             {b.td(:xpath => "//tr[starts-with(@id,'tab-Notes')]/th/table[@class = 'datatable']/tbody[1]/tr[td[@class = 'subhead'][contains(text(),'Note #{@line_number}')]]/following-sibling::tr[1]/td[2]")}
end