testcentricity_web 1.0.20 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4138bec33af343b62212404678aa8a09dc2c149c
4
- data.tar.gz: 39ee25edd0087cb3a8c94dfc90855d750ce01350
3
+ metadata.gz: e6c93ad1ea623efdc142f9b7638bd4f9f416f487
4
+ data.tar.gz: 1899a7cc85da93895514242c5ae8c3d51fede5c5
5
5
  SHA512:
6
- metadata.gz: 6efa4aac3d78650aa5f41baf2c9e4cac538bf9b502264dac45710e55e641cf7f7b0d87282a6d5b6f96756547f1a94b433727df3416eeff9f60e78fa43aed374c
7
- data.tar.gz: 28554a7d8148ecf2a84897c82589830f0028f805df7c3aa8cb81b4f0ca3a18c80d1a31d2f2950418d74cf6fc7bcdd1ee6f23408116bdd349c419cd1096ee55bd
6
+ metadata.gz: 68a89cbddeef0718e0dffceab0db6fb1aaefce7628b7689f8bdda43972e12b69ba3781bbdeaecac5ceabf75af686225a45c80fb0e7e255df0ca4c451a17f1e66
7
+ data.tar.gz: 14c4797b8b0a7cd7416c561678c52e613103bb6d5649e8d5c91bf62fe1fed6f5bc9035558b1bbbf4427fff8dc82f4a898015ba74593eb51bfdfe4af0209dc25a
@@ -24,6 +24,11 @@ module TestCentricity
24
24
  obj.all(@list_item).collect(&:text)
25
25
  end
26
26
 
27
+ def get_list_item(index)
28
+ items = get_list_items
29
+ items[index - 1]
30
+ end
31
+
27
32
  def get_item_count
28
33
  obj, = find_element
29
34
  object_not_found_exception(obj, nil)
@@ -412,16 +412,21 @@ module TestCentricity
412
412
  when :siebel_options
413
413
  actual = ui_object.get_siebel_options
414
414
  else
415
- if property.to_s.start_with?('cell_')
415
+ props = property.to_s.split('_')
416
+ case props[0].to_sym
417
+ when :cell
416
418
  cell = property.to_s.delete('cell_')
417
419
  cell = cell.split('_')
418
420
  actual = ui_object.get_table_cell(cell[0].to_i, cell[1].to_i)
419
- elsif property.to_s.start_with?('row_')
421
+ when :row
420
422
  row = property.to_s.delete('row_')
421
423
  actual = ui_object.get_table_row(row.to_i)
422
- elsif property.to_s.start_with?('column_')
424
+ when :column
423
425
  column = property.to_s.delete('column_')
424
426
  actual = ui_object.get_table_column(column.to_i)
427
+ when :item
428
+ item = property.to_s.delete('item_')
429
+ actual = ui_object.get_list_item(item.to_i)
425
430
  end
426
431
  end
427
432
 
@@ -483,16 +483,21 @@ module TestCentricity
483
483
  when :siebel_options
484
484
  actual = ui_object.get_siebel_options
485
485
  else
486
- if property.to_s.start_with?('cell_')
487
- cell = property.to_s.gsub('cell_', '')
486
+ props = property.to_s.split('_')
487
+ case props[0].to_sym
488
+ when :cell
489
+ cell = property.to_s.delete('cell_')
488
490
  cell = cell.split('_')
489
491
  actual = ui_object.get_table_cell(cell[0].to_i, cell[1].to_i)
490
- elsif property.to_s.start_with?('row_')
491
- row = property.to_s.gsub('row_', '')
492
+ when :row
493
+ row = property.to_s.delete('row_')
492
494
  actual = ui_object.get_table_row(row.to_i)
493
- elsif property.to_s.start_with?('column_')
494
- column = property.to_s.gsub('column_', '')
495
+ when :column
496
+ column = property.to_s.delete('column_')
495
497
  actual = ui_object.get_table_column(column.to_i)
498
+ when :item
499
+ item = property.to_s.delete('item_')
500
+ actual = ui_object.get_list_item(item.to_i)
496
501
  end
497
502
  end
498
503
 
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '1.0.20'
2
+ VERSION = '1.0.21'
3
3
  end
@@ -174,9 +174,16 @@ module TestCentricity
174
174
  capabilities['browserstack.debug'] = 'true'
175
175
  capabilities['project'] = ENV['AUTOMATE_PROJECT'] if ENV['AUTOMATE_PROJECT']
176
176
  capabilities['build'] = ENV['AUTOMATE_BUILD'] if ENV['AUTOMATE_BUILD']
177
+
177
178
  ENV['TEST_CONTEXT'] ?
178
- capabilities['name'] = "#{ENV['TEST_ENVIRONMENT']} - #{ENV['TEST_CONTEXT']}" :
179
- capabilities['name'] = ENV['TEST_ENVIRONMENT']
179
+ context_message = "#{ENV['TEST_ENVIRONMENT']} - #{ENV['TEST_CONTEXT']}" :
180
+ context_message = ENV['TEST_ENVIRONMENT']
181
+ if ENV['PARALLEL']
182
+ thread_num = ENV['TEST_ENV_NUMBER']
183
+ thread_num = 1 if thread_num.blank?
184
+ context_message = "#{context_message} - Thread ##{thread_num}"
185
+ end
186
+ capabilities['name'] = context_message
180
187
 
181
188
  capabilities['acceptSslCerts'] = 'true'
182
189
  capabilities['browserstack.localIdentifier'] = ENV['BS_LOCAL_ID'] if ENV['BS_LOCAL_ID']
@@ -255,7 +262,7 @@ module TestCentricity
255
262
 
256
263
  def self.initialize_remote
257
264
  browser = ENV['WEB_BROWSER']
258
- endpoint = 'http://127.0.0.1:4444/wd/hub'
265
+ endpoint = ENV['REMOTE_ENDPOINT'] || 'http://127.0.0.1:4444/wd/hub'
259
266
  capabilities = Selenium::WebDriver::Remote::Capabilities.send(browser.downcase.to_sym)
260
267
  Capybara.register_driver :remote_browser do |app|
261
268
  Capybara::Selenium::Driver.new(app, :browser => :remote, :url => endpoint, :desired_capabilities => capabilities)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.20
4
+ version: 1.0.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - A.J. Mrozinski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-30 00:00:00.000000000 Z
11
+ date: 2017-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler