Class: OLE_QA::Framework::OLELS::Patron_Email_Line

Inherits:
Line_Object show all
Defined in:
lib/olels/objects/patron_email_line.rb

Overview

A line of email address information on a patron record.

Instance Attribute Summary

Attributes inherited from Line_Object

#line_number, #sublines

Attributes inherited from Common_Object

#elements, #functions, #ole

Instance Method Summary collapse

Methods inherited from Line_Object

#initialize, #line_id, #set_subline

Methods inherited from Common_Object

#initialize, #set_functions

Methods included from Helpers

#browser, #load_yml, #set_element, #set_function

Constructor Details

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

Instance Method Details

#set_elementsObject

Set screen elements on patron record email info line.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/olels/objects/patron_email_line.rb', line 19

def set_elements
  element(:email_type_selector)                       {(line_id == 0) ?
                                                        id_str = 'emailTypeCode_add_control' :
                                                        id_str = "emailTypeCode_line#{line_id - 1}_control"
                                                        b.select_list(:id => id_str)}
  element(:email_address_field)                       {(line_id == 0) ?
                                                        id_str = 'emailAddress_add_control' :
                                                        id_str = "emailAddress_line#{line_id - 1}_control"
                                                        b.text_field(:id => id_str)}
  element(:preferred_checkbox)                        {(line_id == 0) ?
                                                        id_str = 'email_defaultValue_add_control' :
                                                        id_str = "email_defaultValue_line#{line_id - 1}_control"
                                                        b.checkbox(:id => id_str)}
  element(:active_checkbox)                           {(line_id == 0) ?
                                                        id_str = 'email_active_add_control' :
                                                        id_str = "email_active_line#{line_id - 1}_control"
                                                        b.checkbox(:id => id_str)}
  element(:add_button)                                {b.button(:id => 'OlePatronDocument-Email_add')}
  element(:delete_button)                             {b.button(:id => "OlePatronDocument-Email_del_line#{line_id - 1}")}
end