testcentricity_web 1.0.15 → 1.0.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bbdbe09ff6b2d9f3a4b9651e9ec690bef24bfde3
4
- data.tar.gz: 140aa6f20785e4e00775b5647336cc4815557261
3
+ metadata.gz: 669d4e58753aed94817837cef379145f44011e4d
4
+ data.tar.gz: da6acda22bfd7b2deb046361ecbccbf2d7eb63db
5
5
  SHA512:
6
- metadata.gz: 44dbcb59f919f01c41d8196e3091df91fddecb1aa4be1e23843e673a69514d777daadc6d61eb78504273a7c20ab518e7e7c05a47303feb5071c49b899bc44dc6
7
- data.tar.gz: 04178649fb7a2153cb1fadc4c6d1bcfd14ad9681fccb04da184649dc64face37afefeaf677247082ca73acb44e75d83adc16c5cf68e378831d563eb5640013d3
6
+ metadata.gz: 4a775e60b35d257c8c74af514cf3d01930e2024609f4067fcbbe9989a995aa3f899e9be9be7bee2f146341ffefb2db3ff71597a0f67470ffe457e7626807d8f1
7
+ data.tar.gz: fa50860e4be9380eaf52691af8e45ae0cbd1308dc7ed6ad35f5fb5d4997b9eb3087b6277114f5f35369da2f762428817c7a0c18ddb4fa1af05f0bb7974e41786
@@ -353,10 +353,17 @@ module TestCentricity
353
353
 
354
354
  def find_object(visible = true)
355
355
  @alt_locator.nil? ? obj_locator = @locator : obj_locator = @alt_locator
356
- tries ||= 6
357
- attributes = [:id, 'ignore_parent_xpath', 'ignore_parent_css', 'xpath_css', 'css_xpath', :xpath, :css]
356
+ parent_section = @context == :section && !@parent.get_locator.nil?
357
+ if parent_section
358
+ attributes = [:id, :ignore_parent_xpath, :ignore_parent_css, :xpath_css, :css_xpath, :xpath, :css]
359
+ tries ||= 6
360
+ else
361
+ attributes = [:id, :xpath, :css]
362
+ tries ||= 2
363
+ end
364
+
358
365
  type = attributes[tries]
359
- if @context == :section && !@parent.get_locator.nil?
366
+ if parent_section
360
367
  parent_locator = @parent.get_locator
361
368
  case type
362
369
  when :css
@@ -365,18 +372,18 @@ module TestCentricity
365
372
  when :xpath
366
373
  parent_locator = parent_locator.gsub('|', '')
367
374
  obj = page.find(:xpath, "#{parent_locator}#{obj_locator}", :wait => 0.01, :visible => visible)
368
- when 'css_xpath'
375
+ when :css_xpath
369
376
  type = :xpath
370
377
  parent_locator = parent_locator.gsub('|', ' ')
371
378
  obj = page.find(:css, parent_locator, :wait => 0.01).find(:xpath, obj_locator, :wait => 0.01, :visible => visible)
372
- when 'xpath_css'
379
+ when :xpath_css
373
380
  type = :css
374
381
  parent_locator = parent_locator.gsub('|', ' ')
375
382
  obj = page.find(:xpath, parent_locator, :wait => 0.01).find(:css, obj_locator, :wait => 0.01, :visible => visible)
376
- when 'ignore_parent_css'
383
+ when :ignore_parent_css
377
384
  type = :css
378
385
  obj = page.find(:css, obj_locator, :wait => 0.01, :visible => visible)
379
- when 'ignore_parent_xpath'
386
+ when :ignore_parent_xpath
380
387
  type = :xpath
381
388
  obj = page.find(:xpath, obj_locator, :wait => 0.01, :visible => visible)
382
389
  end
@@ -1,3 +1,3 @@
1
1
  module TestCentricityWeb
2
- VERSION = '1.0.15'
2
+ VERSION = '1.0.16'
3
3
  end
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency 'bundler', '~> 1.5'
30
30
  spec.add_development_dependency 'rake'
31
31
 
32
- spec.add_dependency 'capybara', ['>= 2.1', '< 2.7']
32
+ spec.add_dependency 'capybara', ['>= 2.1', '< 3.0']
33
33
  spec.add_dependency 'test-unit'
34
34
  spec.add_dependency 'selenium-webdriver', ['>= 2.50.0', '< 3.0']
35
35
  spec.add_dependency 'poltergeist'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testcentricity_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.15
4
+ version: 1.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - A.J. Mrozinski
@@ -47,7 +47,7 @@ dependencies:
47
47
  version: '2.1'
48
48
  - - "<"
49
49
  - !ruby/object:Gem::Version
50
- version: '2.7'
50
+ version: '3.0'
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
@@ -57,7 +57,7 @@ dependencies:
57
57
  version: '2.1'
58
58
  - - "<"
59
59
  - !ruby/object:Gem::Version
60
- version: '2.7'
60
+ version: '3.0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: test-unit
63
63
  requirement: !ruby/object:Gem::Requirement