locatine 0.01439 → 0.01454

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: 77f63cceefd7594a340e9295b71d7ef491e60ebe
4
- data.tar.gz: 61cdf5270323f799eec652caa3f528b4491c53f0
3
+ metadata.gz: 5f4b5920958d23beb5f982dbf21031b415be3ee2
4
+ data.tar.gz: 6845db3f39092cdfb16e041dcbf30137cb061cff
5
5
  SHA512:
6
- metadata.gz: 2d7c8bc6e6d829f11be85a9c9e783f521c1cbe18febcee3d073417d7bdc729dc8e840849c88c70610049d9998c52f43e2d949f2b83b5187b9fb59bdf6420810d
7
- data.tar.gz: 42bd7eec1492d5495ff35e661513fbd2e1add8dd3d6f084e334ffc9119ea646c1f8d2f7f96b817c013fde0b87fec0b62cd787a063b1b8e97b79ddf4aee16f42a
6
+ metadata.gz: 66bdbebd614dd0e0bc629437b8373ac030b428153c4c76bf85b05f31c213e9a25d184fb9df8bf6925da5b87e34ff776e5efa518f600fed468f53ae6deed26745
7
+ data.tar.gz: 8102bbf0e52b8dac143953a548dc36e9cf8b500baf31f818e2b2959f210ba6d8d3b0e062d6646fb1e8632cb815a465e386ffb9e96979ccf99f430634babc290c
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "Locatine app",
3
- "version": "0.01439",
3
+ "version": "0.01454",
4
4
  "description": "Messaging from browser to main app",
5
5
  "devtools_page": "devtools.html",
6
6
  "permissions": ["activeTab", "storage", "contextMenus", "tabs"],
@@ -6,8 +6,6 @@ module Locatine
6
6
 
7
7
  def collection?(the_class)
8
8
  case the_class.superclass.to_s
9
- when 'Object'
10
- nil
11
9
  when 'Watir::Element'
12
10
  false
13
11
  when 'Watir::ElementCollection'
@@ -22,21 +20,9 @@ module Locatine
22
20
  def find_by_locator(locator)
23
21
  method = @type.nil? ? :elements : @type
24
22
  results = engine.send(method, locator)
25
- case collection?(results.class)
26
- when nil
27
- wrong_method_detected(method)
28
- when true
29
- return correct_method_detected(results)
30
- when false
31
- return acceptable_method_detected(results, method)
32
- end
33
- end
23
+ return correct_method_detected(results) if collection?(results.class)
34
24
 
35
- def wrong_method_detected(method)
36
- @type = nil
37
- raise ArgumentError, "#{method} is not good for :look_in property. Use"\
38
- ' a method of Watir::Browser that returns a collection (like :divs,'\
39
- ' :links, etc.)'
25
+ return acceptable_method_detected(results, method, locator)
40
26
  end
41
27
 
42
28
  def correct_method_detected(results)
@@ -1,6 +1,6 @@
1
1
  module Locatine
2
2
  # constants here...
3
- VERSION = '0.01439'.freeze
3
+ VERSION = '0.01454'.freeze
4
4
  NAME = 'locatine'.freeze
5
5
  HOME = if File.readable?("#{Dir.pwd}/lib/#{Locatine::NAME}")
6
6
  "#{Dir.pwd}/lib/#{Locatine::NAME}"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: locatine
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.01439'
4
+ version: '0.01454'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergei Seleznev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-20 00:00:00.000000000 Z
11
+ date: 2019-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler