class OLE_QA::Framework::Common_Object

OLE object class to be inherited by both Page Object and Data Object classes.

(Grouping together common initialize settings for DRYness.)

@note The instance variable @browser can be used internally to refer to the

browser and only the browser, whereas the instance method .browser, defined
in {OLE_QA::Framework::Helpers#browser} will refer either to the browser
itself or to the browser within the context of the "iframeportlet" frame,
if it is found to be present.

Attributes

elements[R]

Arrays containing the name (Symbol) of each element or function declared

on a data object.
functions[R]

Arrays containing the name (Symbol) of each element or function declared

on a data object.
ole[RW]

The OLE_QA::Framework::Session instance passed to the Data Object.

Public Class Methods

new(ole_session) click to toggle source

@param ole_session [Object] The OLE_QA::Framework::Session instance with which the object should load.

# File lib/common/common_object.rb, line 34
def initialize(ole_session)
  @ole = ole_session
  @browser = ole_session.browser
  @elements = Array.new
  @functions = Array.new
  set_elements if defined?(self.set_elements)
  set_functions if defined?(self.set_functions)
end

Public Instance Methods

set_elements() click to toggle source

Fill this method with element definitions in a subclass.

  • Call super first in this method if the subclass overrides elements from the superclass.

  • Use with {OLE_QA::Framework::Helpers#set_element}

@note This method is automatically called on any subclass if defined therein.

# File lib/common/common_object.rb, line 47
def set_elements
end
set_functions() click to toggle source

Fill this method with function definitions in a subclass.

  • Call super first in this method if the subclass overrides functions from the superclass.

  • Use with {OLE_QA::Framework::Helpers#set_function}

@note This method is automatically called on any subclass if defined therein.

# File lib/common/common_object.rb, line 54
def set_functions
end