locatine 0.01439 → 0.01454
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/locatine/app/manifest.json +1 -1
- data/lib/locatine/find_by_locator.rb +2 -16
- data/lib/locatine/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f4b5920958d23beb5f982dbf21031b415be3ee2
|
4
|
+
data.tar.gz: 6845db3f39092cdfb16e041dcbf30137cb061cff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66bdbebd614dd0e0bc629437b8373ac030b428153c4c76bf85b05f31c213e9a25d184fb9df8bf6925da5b87e34ff776e5efa518f600fed468f53ae6deed26745
|
7
|
+
data.tar.gz: 8102bbf0e52b8dac143953a548dc36e9cf8b500baf31f818e2b2959f210ba6d8d3b0e062d6646fb1e8632cb815a465e386ffb9e96979ccf99f430634babc290c
|
@@ -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
|
-
|
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
|
-
|
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)
|
data/lib/locatine/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2019-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|