Class: OLE_QA::Framework::OLEFS::Lookup

Inherits:
Page show all
Defined in:
lib/olefs/common/lookup.rb

Overview

A Lookup Screen in OLEFS

Instance Attribute Summary

Attributes inherited from Page

#lines, #url, #wait_on

Attributes inherited from Common_Object

#elements, #functions, #ole

Instance Method Summary collapse

Methods inherited from Page

#initialize, #lookup, #lookup_url, #open, #set_line, #wait_for_element, #wait_for_elements, #wait_for_page_to_load

Methods inherited from Common_Object

#initialize

Methods included from Helpers

#browser, #load_yml, #set_element, #set_function

Constructor Details

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

Instance Method Details

#set_elementsObject

Set lookup page elements.



19
20
21
22
23
24
25
26
27
28
# File 'lib/olefs/common/lookup.rb', line 19

def set_elements
  super
  element(:title)                           {b.h1(:xpath => "//div[@id='headerarea-small']/h1")}
  element(:active_indicator_yes)            {b.radio(:id => "activeYes")}
  element(:active_indicator_no)             {b.radio(:id => "activeNo")}
  element(:active_indicator_both)           {b.radio(:id => "activeBoth")}
  element(:search_button)                   {b.input(:title => "search")}
  element(:clear_button)                    {b.input(:title => "clear")}
  element(:cancel_button)                   {b.input(:title => "cancel")}
end

#set_functionsObject

Set commonly-used lookup page functions.



31
32
33
34
35
36
# File 'lib/olefs/common/lookup.rb', line 31

def set_functions
  super
  # Return a search results row by searching on the text in a given table cell.
  function(:row_by_td_text)                 {|which| b.td(:xpath => "//table[@id='row']/descendant::td[contains(text(),'#{which}')]").parent}
  function(:row_by_text)                    {|which| b.td(:xpath => "//table[@id='row']/descendant::td[contains(text(),'#{which}')]").parent}
end