Class: OLE_QA::Framework::OLELS::Describe_Workbench
- Inherits:
-
Lookup
- Object
- Common_Object
- Page
- Lookup
- OLE_QA::Framework::OLELS::Describe_Workbench
- Defined in:
- lib/olels/pages/describe_workbench.rb
Overview
The OLE Library System Describe Workbench screen (implemented in 1.5.0-M2-r18095, 2014-03-20)
Instance Attribute Summary
Attributes inherited from Page
Attributes inherited from Common_Object
Instance Method Summary collapse
-
#initialize(ole_session) ⇒ Describe_Workbench
constructor
A new instance of Describe_Workbench.
- #set_elements ⇒ Object
- #set_functions ⇒ Object
- #set_lines ⇒ 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) ⇒ Describe_Workbench
Returns a new instance of Describe_Workbench.
18 19 20 21 22 |
# File 'lib/olels/pages/describe_workbench.rb', line 18 def initialize(ole_session) url = ole_session.url + 'portal.do?channelTitle=Describe%20Workbench&channelUrl=' url += ole_session.url + 'ole-kr-krad/olesearchcontroller?viewId=OLESearchView&methodToCall=start' super(ole_session,url) end |
Instance Method Details
#set_elements ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/olels/pages/describe_workbench.rb', line 24 def set_elements super element(:document_type_selector) {b.select_list(:id => 'DocumentAndSearchSelectionType_DocType_control')} element(:search_type_selector) {b.select_list(:id => 'DocumentAndSearchSelectionType_SearchType_control')} element(:search_button) {b.(:id => 'SearchButton')} element(:clear_button) {b.(:id => 'ClearButton')} element(:new_search_button) {b.(:id => 'StartSearchButton')} element(:error_message) {b.li(:class => 'uif-errorMessageItem')} element(:export_xml_button) {b.(:id => 'exportToXml')} element(:next) {b.a(:text => /[Nn]ext/)} element(:previous) {b.a(:text => /[Pp]revious/)} end |
#set_functions ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/olels/pages/describe_workbench.rb', line 42 def set_functions super # Check if text is present in results. (Will not search titles.) function(:text_in_results) {|which| b.span(:class => 'uif-readOnlyContent', :text => /#{which}/)} function(:text_in_results?) {|which| text_in_results(which).present?} # Check if title is present in results. function(:title_in_results) {|which| b.a(:class => 'uif-link',:text => /#{which}/)} function(:title_in_results?) {|which| title_in_results(which).present?} # Return the select checkbox for a line in the search results containing the given text. (Will not work with titles.) function(:select_by_text) {|which| text_in_results(which).parent.parent.parent.td(:index => 0).div(:class => 'uif-inputField').checkbox(:class => 'uif-checkboxControl')} # Return the select checkbox for a line in the search results containing the given text. function(:select_by_title) {|which| title_in_results(which).parent.parent.parent.td(:index => 0).div(:class => 'uif-inputField').checkbox(:class => 'uif-checkboxControl')} end |
#set_lines ⇒ Object
56 57 58 |
# File 'lib/olels/pages/describe_workbench.rb', line 56 def set_lines set_line(:search_line, OLE_QA::Framework::OLELS::Workbench_Line) end |
#wait_for_elements ⇒ Object
37 38 39 40 |
# File 'lib/olels/pages/describe_workbench.rb', line 37 def wait_for_elements super @wait_on << :document_type_selector << :search_button end |