Class: OLE_QA::Framework::DocStore::Search
- Inherits:
-
Page
- Object
- Common_Object
- Page
- OLE_QA::Framework::DocStore::Search
- Defined in:
- lib/docstore/pages/search.rb
Overview
The search page for the OLE Document Store.
Instance Attribute Summary
Attributes inherited from Page
Attributes inherited from Common_Object
Instance Method Summary collapse
-
#initialize(ole_session) ⇒ Search
constructor
A new instance of Search.
- #set_elements ⇒ Object
- #set_functions ⇒ Object
- #wait_for_elements ⇒ Object
Methods inherited from Page
#lookup, #lookup_url, #open, #set_line, #wait_for_element, #wait_for_page_to_load
Methods included from Helpers
#browser, #load_yml, #set_element, #set_function
Constructor Details
#initialize(ole_session) ⇒ Search
Returns a new instance of Search.
18 19 20 21 |
# File 'lib/docstore/pages/search.rb', line 18 def initialize(ole_session) url = ole_session.docstore_url + 'discovery.do?searchType=newSearch' super(ole_session, url) end |
Instance Method Details
#set_elements ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/docstore/pages/search.rb', line 23 def set_elements super element(:category_selector) {b.select_list(:id => 'documentCategory')} element(:type_selector) {b.select_list(:id => 'documentType')} element(:format_selector) {b.select_list(:id => 'documentFormat')} element(:sort_selector) {b.select_list(:id => 'sorting_order')} element(:search_field_1) {b.text_field(:name => 'st')} element(:search_field_2) {b.text_field(:name => 'st1')} element(:search_field_3) {b.text_field(:name => 'st2')} element(:search_field_4) {b.text_field(:name => 'st3')} element(:search_field_5) {b.text_field(:name => 'st4')} element(:scope_selector_1) {b.select_list(:name => 'searchScope')} element(:scope_selector_2) {b.select_list(:name => 'searchScope1')} element(:scope_selector_3) {b.select_list(:name => 'searchScope2')} element(:scope_selector_4) {b.select_list(:name => 'searchScope3')} element(:scope_selector_5) {b.select_list(:name => 'searchScope4')} element(:field_selector_1) {b.select_list(:name => 'searchField')} element(:field_selector_2) {b.select_list(:name => 'searchField1')} element(:field_selector_3) {b.select_list(:name => 'searchField2')} element(:field_selector_4) {b.select_list(:name => 'searchField3')} element(:field_selector_5) {b.select_list(:name => 'searchField4')} element(:search_button) {b.(:class => 'searchButton')} element(:clear_button) {b.(:name => 'Clear')} end |
#set_functions ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/docstore/pages/search.rb', line 55 def set_functions super # The 'AND' join operator option for a given search line. # @note Integer should be between 1 and 3, corresponding to the operator line. # Each operator line affects the next search query line in sequence, # (i.e., .and_option(1) affects search_field_2) function(:and_option) { |which = 1| which -= 1 ; b.radio(:name => "operator#{which}", :index => 0)} # The 'OR' join operator option for a given search line. # Each operator line affects the next search query line in sequence, # (i.e., .or_option(1) affects search_field_2) function(:or_option) { |which = 1| which -= 1 ; b.radio(:name => "operator#{which}", :index => 1)} # The 'NOT' join operator option for a given search line. # Each operator line affects the next search query line in sequence, # (i.e., .not_option(1) affects search_field_2) function(:not_option) { |which = 1| which -= 1 ; b.radio(:name => "operator#{which}", :index => 2)} end |
#wait_for_elements ⇒ Object
48 49 50 51 52 53 |
# File 'lib/docstore/pages/search.rb', line 48 def wait_for_elements super @wait_on << :search_field_1 @wait_on << :search_field_5 @wait_on << :search_button end |