Class: OLE_QA::Framework::OLEFS::Lookup
- Inherits:
-
Page
- Object
- Common_Object
- Page
- OLE_QA::Framework::OLEFS::Lookup
- Defined in:
- lib/olefs/common/lookup.rb
Overview
A Lookup Screen in OLEFS
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Page
Attributes inherited from Common_Object
Instance Method Summary collapse
-
#set_elements ⇒ Object
Set lookup page elements.
-
#set_functions ⇒ Object
Set commonly-used lookup page functions.
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
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_elements ⇒ Object
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_functions ⇒ Object
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 |