Class: OLE_QA::Framework::DocStore::Marc_Results
- Inherits:
-
Results
- Object
- Common_Object
- Page
- Results
- OLE_QA::Framework::DocStore::Marc_Results
- Defined in:
- lib/docstore/pages/marc_results.rb
Overview
OLE Document Store Search Results for a Marc Bibliographic Record search.
Instance Attribute Summary
Attributes inherited from Page
Attributes inherited from Common_Object
Instance Method Summary collapse
Methods inherited from Results
#initialize, #wait_for_elements
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::DocStore::Results
Instance Method Details
#set_elements ⇒ Object
19 20 21 22 |
# File 'lib/docstore/pages/marc_results.rb', line 19 def set_elements super end |
#set_functions ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/docstore/pages/marc_results.rb', line 24 def set_functions super # Return a 'view' button by a given (1-based) numerical value. function(:view_button) { |which = 1| which -= 1 ; b.(:value => /View/, :index => which)} # Return an 'edit' button by a given (1-based) numerical value. function(:edit_button) { |which = 1| which -= 1 ; b.(:name => 'Edit', :index => which)} # Return an 'instance' link by a given (1-based) numerical value. function(:instance_link) { |which = 1| which -= 1 ; b.b(:text => /Instance/, :index => which).parent} # Return a field value (other than title) in the results. function(:value_in_results) { |which| b.dd(:text => /#{which}/) } # Check whether a given field value exists in the search results. function(:value_in_results?) { |which| value_in_results(which).present?} # Alias value_in_results and value_in_results? to text_in_results/?. function(:text_in_results) { |which| value_in_results(which)} function(:text_in_results?) { |which| value_in_results?(which)} # Return an instance link containing the given text. function(:instance_text) { |which| b.b(:text => /#{which}/).parent } end |