testcentricity_web 1.0.16 → 1.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -0
  3. data/.rubocop.yml +41 -0
  4. data/.yardopts +0 -0
  5. data/Gemfile +0 -0
  6. data/LICENSE.txt +0 -0
  7. data/README.md +9 -3
  8. data/Rakefile +0 -0
  9. data/lib/devices/devices.yml +0 -0
  10. data/lib/testcentricity_web.rb +16 -6
  11. data/lib/testcentricity_web/browser_helper.rb +6 -6
  12. data/lib/testcentricity_web/elements/button.rb +0 -0
  13. data/lib/testcentricity_web/elements/checkbox.rb +4 -4
  14. data/lib/testcentricity_web/elements/file_field.rb +1 -1
  15. data/lib/testcentricity_web/elements/image.rb +1 -1
  16. data/lib/testcentricity_web/elements/label.rb +0 -0
  17. data/lib/testcentricity_web/elements/link.rb +0 -0
  18. data/lib/testcentricity_web/elements/list.rb +5 -5
  19. data/lib/testcentricity_web/elements/radio.rb +3 -3
  20. data/lib/testcentricity_web/elements/select_list.rb +16 -16
  21. data/lib/testcentricity_web/elements/table.rb +3 -4
  22. data/lib/testcentricity_web/elements/textfield.rb +4 -4
  23. data/lib/testcentricity_web/environment.rb +30 -2
  24. data/lib/testcentricity_web/excel_helper.rb +12 -12
  25. data/lib/testcentricity_web/exception_queue_helper.rb +1 -1
  26. data/lib/testcentricity_web/page_objects_helper.rb +102 -102
  27. data/lib/testcentricity_web/page_sections_helper.rb +112 -112
  28. data/lib/testcentricity_web/siebel_open_ui_helper.rb +1 -1
  29. data/lib/testcentricity_web/ui_elements_helper.rb +45 -45
  30. data/lib/testcentricity_web/utility_helpers.rb +0 -0
  31. data/lib/testcentricity_web/version.rb +1 -1
  32. data/lib/testcentricity_web/webdriver_helper.rb +79 -70
  33. data/lib/testcentricity_web/world_extensions.rb +0 -0
  34. data/testcentricity_web.gemspec +1 -0
  35. metadata +5 -3
@@ -2,7 +2,7 @@ module TestCentricity
2
2
  class TextField < UIElement
3
3
  def initialize(name, parent, locator, context)
4
4
  super
5
- @type = :textfield
5
+ @type = :textfield
6
6
  end
7
7
 
8
8
  # Is text field set to read-only?
@@ -12,7 +12,7 @@ module TestCentricity
12
12
  # comments_field.read_only?
13
13
  #
14
14
  def read_only?
15
- obj, _ = find_element
15
+ obj, = find_element
16
16
  object_not_found_exception(obj, nil)
17
17
  !!obj.native.attribute('readonly')
18
18
  end
@@ -24,7 +24,7 @@ module TestCentricity
24
24
  # max_num_chars = comments_field.get_max_length
25
25
  #
26
26
  def get_max_length
27
- obj, _ = find_element
27
+ obj, = find_element
28
28
  object_not_found_exception(obj, nil)
29
29
  max_length = obj.native.attribute('maxlength')
30
30
  max_length.to_i unless max_length.blank?
@@ -37,7 +37,7 @@ module TestCentricity
37
37
  # placeholder_message = username_field.get_placeholder
38
38
  #
39
39
  def get_placeholder
40
- obj, _ = find_element
40
+ obj, = find_element
41
41
  object_not_found_exception(obj, nil)
42
42
  obj.native.attribute('placeholder')
43
43
  end
@@ -64,9 +64,9 @@ module TestCentricity
64
64
  end
65
65
 
66
66
  def self.session_code
67
- if @session_code == nil
67
+ if @session_code.nil?
68
68
  characters = ('a'..'z').to_a
69
- @session_code = (0..12).map{characters.sample}.join
69
+ @session_code = (0..12).map { characters.sample }.join
70
70
  end
71
71
  @session_code
72
72
  end
@@ -83,6 +83,10 @@ module TestCentricity
83
83
  @browser = browser.downcase.to_sym
84
84
  end
85
85
 
86
+ def self.browser=(browser)
87
+ @browser = browser.downcase.to_sym
88
+ end
89
+
86
90
  def self.browser
87
91
  @browser
88
92
  end
@@ -91,6 +95,10 @@ module TestCentricity
91
95
  @os = os
92
96
  end
93
97
 
98
+ def self.os=(os)
99
+ @os = os
100
+ end
101
+
94
102
  def self.os
95
103
  @os
96
104
  end
@@ -99,6 +107,10 @@ module TestCentricity
99
107
  @device = device
100
108
  end
101
109
 
110
+ def self.device=(device)
111
+ @device = device
112
+ end
113
+
102
114
  def self.is_device?
103
115
  @device
104
116
  end
@@ -107,6 +119,10 @@ module TestCentricity
107
119
  @device_type = type.downcase
108
120
  end
109
121
 
122
+ def self.device_type=(type)
123
+ @device_type = type.downcase
124
+ end
125
+
110
126
  def self.device_type
111
127
  @device_type
112
128
  end
@@ -115,6 +131,10 @@ module TestCentricity
115
131
  @platform = platform
116
132
  end
117
133
 
134
+ def self.platform=(platform)
135
+ @platform = platform
136
+ end
137
+
118
138
  def self.is_mobile?
119
139
  @platform == :mobile
120
140
  end
@@ -135,6 +155,10 @@ module TestCentricity
135
155
  @portal_status = portal_state
136
156
  end
137
157
 
158
+ def self.portal_state=(portal_state)
159
+ @portal_status = portal_state
160
+ end
161
+
138
162
  def self.portal_state
139
163
  @portal_status
140
164
  end
@@ -143,6 +167,10 @@ module TestCentricity
143
167
  @portal_context = portal_context
144
168
  end
145
169
 
170
+ def self.portal_context=(portal_context)
171
+ @portal_context = portal_context
172
+ end
173
+
146
174
  def self.portal_context
147
175
  @portal_context
148
176
  end
@@ -27,7 +27,7 @@ module TestCentricity
27
27
  exists = false
28
28
  if worksheet_exists?(file, sheet)
29
29
  work_book = Spreadsheet.open file
30
- work_sheet = work_book.worksheet sheet
30
+ work_sheet = work_book.worksheet sheet
31
31
  # get column headings from row 0 of worksheet
32
32
  headings = work_sheet.row(0)
33
33
  # if rowspec is a string then we have to find a matching row name
@@ -160,7 +160,7 @@ module TestCentricity
160
160
  end
161
161
 
162
162
  # if no columns have been specified, return all columns
163
- columns = headings if columns == nil
163
+ columns = headings if columns.nil?
164
164
  # create results hash table
165
165
  result = Hash.new
166
166
  columns.each do |column|
@@ -223,16 +223,16 @@ module TestCentricity
223
223
  test_value = value.split('!', 2)
224
224
  parameter = test_value[1].split('.', 2)
225
225
  case parameter[0]
226
- when 'Address', 'Bitcoin', 'Business', 'Code', 'Color', 'Commerce', 'Company', 'Crypto', 'File', 'Hacker', 'Hipster', 'Internet', 'Lorem', 'Name', 'Number', 'PhoneNumber'
227
- result = eval("Faker::#{parameter[0]}.#{parameter[1]}")
228
- when 'Date'
229
- result = eval("Chronic.parse('#{parameter[1]}')")
230
- when 'FormattedDate', 'FormatDate'
231
- date_time_params = parameter[1].split(" format! ", 2)
232
- date_time = eval("Chronic.parse('#{date_time_params[0].strip}')")
233
- result = date_time.to_s.format_date_time("#{date_time_params[1].strip}")
234
- else
235
- result = eval(test_value[1])
226
+ when 'Address', 'Bitcoin', 'Business', 'Code', 'Color', 'Commerce', 'Company', 'Crypto', 'File', 'Hacker', 'Hipster', 'Internet', 'Lorem', 'Name', 'Number', 'PhoneNumber'
227
+ result = eval("Faker::#{parameter[0]}.#{parameter[1]}")
228
+ when 'Date'
229
+ result = eval("Chronic.parse('#{parameter[1]}')")
230
+ when 'FormattedDate', 'FormatDate'
231
+ date_time_params = parameter[1].split(' format! ', 2)
232
+ date_time = eval("Chronic.parse('#{date_time_params[0].strip}')")
233
+ result = date_time.to_s.format_date_time("#{date_time_params[1].strip}")
234
+ else
235
+ result = eval(test_value[1])
236
236
  end
237
237
  result.to_s
238
238
  end
@@ -37,7 +37,7 @@ module TestCentricity
37
37
  def self.enqueue_screenshot
38
38
  timestamp = Time.now.strftime('%Y%m%d%H%M%S')
39
39
  filename = "Screenshot-#{timestamp}"
40
- path = File.join Dir.pwd, "reports/screenshots/", filename
40
+ path = File.join Dir.pwd, 'reports/screenshots/', filename
41
41
  Capybara.save_screenshot "#{path}.png"
42
42
  puts "Screenshot saved at #{path}.png"
43
43
  screen_shot = { :path => path, :filename => filename }
@@ -28,7 +28,7 @@ module TestCentricity
28
28
  # element :siebel_busy, "//html[contains(@class, 'siebui-busy')]"
29
29
  #
30
30
  def self.element(element_name, locator)
31
- class_eval(%Q(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::UIElement.new("#{element_name}", self, "#{locator}", :page);end))
31
+ class_eval(%(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::UIElement.new("#{element_name}", self, "#{locator}", :page);end))
32
32
  end
33
33
 
34
34
  # Declare and instantiate a collection of generic UI Elements for this page object.
@@ -54,7 +54,7 @@ module TestCentricity
54
54
  # button :login_button, "//input[@id='submit_button']"
55
55
  #
56
56
  def self.button(element_name, locator)
57
- class_eval(%Q(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::Button.new("#{element_name}", self, "#{locator}", :page);end))
57
+ class_eval(%(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::Button.new("#{element_name}", self, "#{locator}", :page);end))
58
58
  end
59
59
 
60
60
  # Declare and instantiate a collection of buttons for this page object.
@@ -80,7 +80,7 @@ module TestCentricity
80
80
  # textfield :password_field, 'consumer_password'
81
81
  #
82
82
  def self.textfield(element_name, locator)
83
- class_eval(%Q(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::TextField.new("#{element_name}", self, "#{locator}", :page);end))
83
+ class_eval(%(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::TextField.new("#{element_name}", self, "#{locator}", :page);end))
84
84
  end
85
85
 
86
86
  # Declare and instantiate a collection of text fields for this page object.
@@ -109,7 +109,7 @@ module TestCentricity
109
109
  # checkbox :accept_terms_checkbox, 'input#accept_terms_conditions', :accept_terms_label
110
110
  #
111
111
  def self.checkbox(element_name, locator, proxy = nil)
112
- class_eval(%Q(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::CheckBox.new("#{element_name}", self, "#{locator}", :page, #{proxy});end))
112
+ class_eval(%(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::CheckBox.new("#{element_name}", self, "#{locator}", :page, #{proxy});end))
113
113
  end
114
114
 
115
115
  # Declare and instantiate a collection of checkboxes for this page object.
@@ -137,7 +137,7 @@ module TestCentricity
137
137
  # radio :decline_terms_radio, '#decline_terms_conditions', :decline_terms_label
138
138
  #
139
139
  def self.radio(element_name, locator, proxy = nil)
140
- class_eval(%Q(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::Radio.new("#{element_name}", self, "#{locator}", :page, #{proxy});end))
140
+ class_eval(%(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::Radio.new("#{element_name}", self, "#{locator}", :page, #{proxy});end))
141
141
  end
142
142
 
143
143
  # Declare and instantiate a collection of radio buttons for this page object.
@@ -164,7 +164,7 @@ module TestCentricity
164
164
  # label :rollup_price_label, "//div[contains(@id, 'Rollup Item Price')]"
165
165
  #
166
166
  def self.label(element_name, locator)
167
- class_eval(%Q(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::Label.new("#{element_name}", self, "#{locator}", :page);end))
167
+ class_eval(%(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::Label.new("#{element_name}", self, "#{locator}", :page);end))
168
168
  end
169
169
 
170
170
  def self.labels(element_hash)
@@ -182,7 +182,7 @@ module TestCentricity
182
182
  # link :shopping_basket_link, "//a[@href='shopping_basket']"
183
183
  #
184
184
  def self.link(element_name, locator)
185
- class_eval(%Q(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::Link.new("#{element_name}", self, "#{locator}", :page);end))
185
+ class_eval(%(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::Link.new("#{element_name}", self, "#{locator}", :page);end))
186
186
  end
187
187
 
188
188
  def self.links(element_hash)
@@ -199,7 +199,7 @@ module TestCentricity
199
199
  # table :payments_table, "//table[@class='payments_table']"
200
200
  #
201
201
  def self.table(element_name, locator)
202
- class_eval(%Q(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::Table.new("#{element_name}", self, "#{locator}", :page);end))
202
+ class_eval(%(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::Table.new("#{element_name}", self, "#{locator}", :page);end))
203
203
  end
204
204
 
205
205
  def self.tables(element_hash)
@@ -217,7 +217,7 @@ module TestCentricity
217
217
  # selectlist :gender_select, "//select[@id='customer_gender']"
218
218
  #
219
219
  def self.selectlist(element_name, locator)
220
- class_eval(%Q(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::SelectList.new("#{element_name}", self, "#{locator}", :page);end))
220
+ class_eval(%(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::SelectList.new("#{element_name}", self, "#{locator}", :page);end))
221
221
  end
222
222
 
223
223
  def self.selectlists(element_hash)
@@ -234,7 +234,7 @@ module TestCentricity
234
234
  # list :x_axis_list, 'g.x-axis'
235
235
  #
236
236
  def self.list(element_name, locator)
237
- class_eval(%Q(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::List.new("#{element_name}", self, "#{locator}", :page);end))
237
+ class_eval(%(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::List.new("#{element_name}", self, "#{locator}", :page);end))
238
238
  end
239
239
 
240
240
  def self.lists(element_hash)
@@ -252,7 +252,7 @@ module TestCentricity
252
252
  # image :corporate_logo_image, "//img[@alt='MyCompany_logo']"
253
253
  #
254
254
  def self.image(element_name, locator)
255
- class_eval(%Q(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::Image.new("#{element_name}", self, "#{locator}", :page);end))
255
+ class_eval(%(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::Image.new("#{element_name}", self, "#{locator}", :page);end))
256
256
  end
257
257
 
258
258
  def self.images(element_hash)
@@ -269,7 +269,7 @@ module TestCentricity
269
269
  # filefield :attach_file, 's_SweFileName'
270
270
  #
271
271
  def self.filefield(element_name, locator)
272
- class_eval(%Q(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::FileField.new("#{element_name}", self, "#{locator}", :page);end))
272
+ class_eval(%(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::FileField.new("#{element_name}", self, "#{locator}", :page);end))
273
273
  end
274
274
 
275
275
  # Instantiate a single PageSection object for this page object.
@@ -280,7 +280,7 @@ module TestCentricity
280
280
  # section :search_form, SearchForm
281
281
  #
282
282
  def self.section(section_name, class_name, locator = nil)
283
- class_eval(%Q(def #{section_name.to_s};@#{section_name.to_s} ||= #{class_name.to_s}.new("#{section_name}", self, "#{locator}", :page);end))
283
+ class_eval(%(def #{section_name.to_s};@#{section_name.to_s} ||= #{class_name.to_s}.new("#{section_name}", self, "#{locator}", :page);end))
284
284
  end
285
285
 
286
286
  def self.sections(section_hash)
@@ -368,91 +368,91 @@ module TestCentricity
368
368
  end
369
369
 
370
370
  def verify_ui_states(ui_states)
371
- ui_states.each do | ui_object, object_states |
372
- object_states.each do | property, state |
371
+ ui_states.each do |ui_object, object_states|
372
+ object_states.each do |property, state|
373
373
  case property
374
- when :exists
375
- actual = ui_object.exists?
376
- when :enabled
377
- actual = ui_object.enabled?
378
- when :disabled
379
- actual = ui_object.disabled?
380
- when :visible
381
- actual = ui_object.visible?
382
- when :hidden
383
- actual = ui_object.hidden?
384
- when :width
385
- actual = ui_object.get_width
386
- when :height
387
- actual = ui_object.get_height
388
- when :readonly
389
- actual = ui_object.read_only?
390
- when :checked
391
- actual = ui_object.checked?
392
- when :selected
393
- actual = ui_object.selected?
394
- when :value, :caption
395
- actual = ui_object.get_value
396
- when :maxlength
397
- actual = ui_object.get_max_length
398
- when :rowcount
399
- actual = ui_object.get_row_count
400
- when :columncount
401
- actual = ui_object.get_column_count
402
- when :placeholder
403
- actual = ui_object.get_placeholder
404
- when :options, :items, :list_items
405
- actual = ui_object.get_list_items
406
- when :optioncount, :itemcount
407
- actual = ui_object.get_item_count
408
- when :column_headers
409
- actual = ui_object.get_header_columns
410
- when :siebel_options
411
- actual = ui_object.get_siebel_options
412
- else
413
- if property.to_s.start_with? ('cell_')
414
- cell = property.to_s.gsub('cell_', '')
415
- cell = cell.split('_')
416
- actual = ui_object.get_table_cell(cell[0].to_i, cell[1].to_i)
417
- elsif property.to_s.start_with? ('row_')
418
- row = property.to_s.gsub('row_', '')
419
- actual = ui_object.get_table_row(row.to_i)
420
- elsif property.to_s.start_with? ('column_')
421
- column = property.to_s.gsub('column_', '')
422
- actual = ui_object.get_table_column(column.to_i)
423
- end
374
+ when :exists
375
+ actual = ui_object.exists?
376
+ when :enabled
377
+ actual = ui_object.enabled?
378
+ when :disabled
379
+ actual = ui_object.disabled?
380
+ when :visible
381
+ actual = ui_object.visible?
382
+ when :hidden
383
+ actual = ui_object.hidden?
384
+ when :width
385
+ actual = ui_object.get_width
386
+ when :height
387
+ actual = ui_object.get_height
388
+ when :readonly
389
+ actual = ui_object.read_only?
390
+ when :checked
391
+ actual = ui_object.checked?
392
+ when :selected
393
+ actual = ui_object.selected?
394
+ when :value, :caption
395
+ actual = ui_object.get_value
396
+ when :maxlength
397
+ actual = ui_object.get_max_length
398
+ when :rowcount
399
+ actual = ui_object.get_row_count
400
+ when :columncount
401
+ actual = ui_object.get_column_count
402
+ when :placeholder
403
+ actual = ui_object.get_placeholder
404
+ when :options, :items, :list_items
405
+ actual = ui_object.get_list_items
406
+ when :optioncount, :itemcount
407
+ actual = ui_object.get_item_count
408
+ when :column_headers
409
+ actual = ui_object.get_header_columns
410
+ when :siebel_options
411
+ actual = ui_object.get_siebel_options
412
+ else
413
+ if property.to_s.start_with?('cell_')
414
+ cell = property.to_s.delete('cell_')
415
+ cell = cell.split('_')
416
+ actual = ui_object.get_table_cell(cell[0].to_i, cell[1].to_i)
417
+ elsif property.to_s.start_with?('row_')
418
+ row = property.to_s.delete('row_')
419
+ actual = ui_object.get_table_row(row.to_i)
420
+ elsif property.to_s.start_with?('column_')
421
+ column = property.to_s.delete('column_')
422
+ actual = ui_object.get_table_column(column.to_i)
423
+ end
424
424
  end
425
425
 
426
426
  if state.is_a?(Hash) && state.length == 1
427
427
  error_msg = "Expected UI object '#{ui_object.get_name}' (#{ui_object.get_locator}) #{property.to_s} property to"
428
428
  state.each do |key, value|
429
429
  case key
430
- when :lt, :less_than
431
- ExceptionQueue.enqueue_exception("#{error_msg} be less than #{value} but found #{actual}") unless actual < value
432
- when :lt_eq, :less_than_or_equal
433
- ExceptionQueue.enqueue_exception("#{error_msg} be less than or equal to #{value} but found #{actual}") unless actual <= value
434
- when :gt, :greater_than
435
- ExceptionQueue.enqueue_exception("#{error_msg} be greater than #{value} but found #{actual}") unless actual > value
436
- when :gt_eq, :greater_than_or_equal
437
- ExceptionQueue.enqueue_exception("#{error_msg} be greater than or equal to #{value} but found #{actual}") unless actual >= value
438
- when :starts_with
439
- ExceptionQueue.enqueue_exception("#{error_msg} start with '#{value}' but found #{actual}") unless actual.start_with?(value)
440
- when :ends_with
441
- ExceptionQueue.enqueue_exception("#{error_msg} end with '#{value}' but found #{actual}") unless actual.end_with?(value)
442
- when :contains
443
- ExceptionQueue.enqueue_exception("#{error_msg} contain '#{value}' but found #{actual}") unless actual.include?(value)
444
- when :like, :is_like
445
- actual_like = actual.gsub("\n", '')
446
- actual_like = actual_like.gsub("\r", '')
447
- actual_like = actual_like.gsub("\t", '')
448
- actual_like = actual_like.gsub(' ', '')
449
- actual_like = actual_like.downcase
450
- expected = value.gsub("\n", '')
451
- expected = expected.gsub("\r", '')
452
- expected = expected.gsub("\t", '')
453
- expected = expected.gsub(' ', '')
454
- expected = expected.downcase
455
- ExceptionQueue.enqueue_exception("#{error_msg} be like '#{value}' but found #{actual}") unless actual_like.include?(expected)
430
+ when :lt, :less_than
431
+ ExceptionQueue.enqueue_exception("#{error_msg} be less than #{value} but found #{actual}") unless actual < value
432
+ when :lt_eq, :less_than_or_equal
433
+ ExceptionQueue.enqueue_exception("#{error_msg} be less than or equal to #{value} but found #{actual}") unless actual <= value
434
+ when :gt, :greater_than
435
+ ExceptionQueue.enqueue_exception("#{error_msg} be greater than #{value} but found #{actual}") unless actual > value
436
+ when :gt_eq, :greater_than_or_equal
437
+ ExceptionQueue.enqueue_exception("#{error_msg} be greater than or equal to #{value} but found #{actual}") unless actual >= value
438
+ when :starts_with
439
+ ExceptionQueue.enqueue_exception("#{error_msg} start with '#{value}' but found #{actual}") unless actual.start_with?(value)
440
+ when :ends_with
441
+ ExceptionQueue.enqueue_exception("#{error_msg} end with '#{value}' but found #{actual}") unless actual.end_with?(value)
442
+ when :contains
443
+ ExceptionQueue.enqueue_exception("#{error_msg} contain '#{value}' but found #{actual}") unless actual.include?(value)
444
+ when :like, :is_like
445
+ actual_like = actual.delete("\n")
446
+ actual_like = actual_like.delete("\r")
447
+ actual_like = actual_like.delete("\t")
448
+ actual_like = actual_like.delete(' ')
449
+ actual_like = actual_like.downcase
450
+ expected = value.delete("\n")
451
+ expected = expected.delete("\r")
452
+ expected = expected.delete("\t")
453
+ expected = expected.delete(' ')
454
+ expected = expected.downcase
455
+ ExceptionQueue.enqueue_exception("#{error_msg} be like '#{value}' but found #{actual}") unless actual_like.include?(expected)
456
456
  end
457
457
  end
458
458
  else
@@ -480,7 +480,7 @@ module TestCentricity
480
480
  # populate_data_fields(data)
481
481
  #
482
482
  def populate_data_fields(data)
483
- data.each do | data_field, data_param |
483
+ data.each do |data_field, data_param|
484
484
  unless data_param.blank?
485
485
  # make sure the intended UI target element exists before trying to set its value
486
486
  data_field.wait_until_exists(2)
@@ -488,16 +488,16 @@ module TestCentricity
488
488
  data_field.set('')
489
489
  else
490
490
  case data_field.get_object_type
491
- when :checkbox
492
- data_field.set_checkbox_state(data_param.to_bool)
493
- when :selectlist
494
- (data_field.get_siebel_object_type == 'JComboBox') ?
495
- data_field.set("#{data_param}\t") :
496
- data_field.choose_option(data_param)
497
- when :radio
498
- data_field.set_selected_state(data_param.to_bool)
499
- when :textfield
500
- data_field.set("#{data_param}\t")
491
+ when :checkbox
492
+ data_field.set_checkbox_state(data_param.to_bool)
493
+ when :selectlist
494
+ (data_field.get_siebel_object_type == 'JComboBox') ?
495
+ data_field.set("#{data_param}\t") :
496
+ data_field.choose_option(data_param)
497
+ when :radio
498
+ data_field.set_selected_state(data_param.to_bool)
499
+ when :textfield
500
+ data_field.set("#{data_param}\t")
501
501
  end
502
502
  end
503
503
  end