unobtainium-multiwait 0.1.0 → 0.2.0

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: 4c0be5b0d21564f39c671a3ce93b033694a1be33
4
- data.tar.gz: edcd6536595cce853ebf59d5cbdb7dffb9a1ee38
3
+ metadata.gz: d6218c8b4ef791fd979f639879f639599b674aea
4
+ data.tar.gz: 67ca3493e9c0654d8ae28a12ea553831b6311c3f
5
5
  SHA512:
6
- metadata.gz: b61d7186397ad199a2d9ce591d3ccb3f03943cb15a3ef9b32799cf6921a66d0ca730cd715d7f46755bcba1993f0bc701f6ad8ddd3f5f1e4e0db62f7c0a7e4499
7
- data.tar.gz: 8b76fb36e10b0382d8df528cb163a1e8c86e86f980615b7f773971374fcf47b17c380b8d2e5cde99303e1ed109856e5cf4ca56deb1becaa72136bc234f38168f
6
+ metadata.gz: 5d9042b75d5fd1667b167deea75f7b447a697d393447fbb472db51450968f7e3914b82cc2588c46ca3acf730e65cd349179b8c107331e32cfcd72134ec0ee190
7
+ data.tar.gz: b9e605d3b172779bbd905afb600430a5785ce66ab0cb6962295917cee4dfd5aa6f2223cec405bc40b5d81d437d0ded7058c9eeac2a4dece317a87f8063fcd912
@@ -70,3 +70,6 @@ Style/NumericLiterals:
70
70
 
71
71
  Style/FileName:
72
72
  Enabled: false
73
+
74
+ Style/SpaceAfterNot:
75
+ Enabled: false
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- unobtainium-multiwait (0.1.0)
4
+ unobtainium-multiwait (0.2.0)
5
5
  unobtainium (~> 0.5)
6
- unobtainium-multifind (~> 0.2)
6
+ unobtainium-multifind (~> 0.3)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
@@ -36,8 +36,8 @@ GEM
36
36
  diff-lcs (>= 1.2.0, < 2.0)
37
37
  rspec-support (~> 3.4.0)
38
38
  rspec-support (3.4.1)
39
- rubocop (0.39.0)
40
- parser (>= 2.3.0.7, < 3.0)
39
+ rubocop (0.40.0)
40
+ parser (>= 2.3.1.0, < 3.0)
41
41
  powerpack (~> 0.1)
42
42
  rainbow (>= 1.99.1, < 3.0)
43
43
  ruby-progressbar (~> 1.7)
@@ -57,7 +57,7 @@ GEM
57
57
  unicode-display_width (1.0.5)
58
58
  unobtainium (0.5.0)
59
59
  sys-proctable (~> 1.0)
60
- unobtainium-multifind (0.2.0)
60
+ unobtainium-multifind (0.3.0)
61
61
  unobtainium (~> 0.5)
62
62
  websocket (1.2.3)
63
63
  yard (0.8.7.6)
@@ -71,11 +71,11 @@ DEPENDENCIES
71
71
  phantomjs
72
72
  rake (~> 11.1)
73
73
  rspec (~> 3.4)
74
- rubocop (~> 0.39)
74
+ rubocop (~> 0.40)
75
75
  selenium-webdriver
76
76
  simplecov (~> 0.11)
77
77
  unobtainium-multiwait!
78
78
  yard (~> 0.8)
79
79
 
80
80
  BUNDLED WITH
81
- 1.12.1
81
+ 1.12.3
@@ -33,6 +33,10 @@ module Unobtainium
33
33
  # that Selenium::WebDriver::Element responds to, or :exists? if you only
34
34
  # care whether the element exists.
35
35
  check_element: :displayed?,
36
+ # The default method to perform the actual find is :find_element, but
37
+ # you can override this here. The most sensible case would be to use
38
+ # :find_elements instead, of course.
39
+ find_method: :find_element,
36
40
  # The default wait timeout in seconds.
37
41
  timeout: 10,
38
42
  }.freeze
@@ -53,12 +57,11 @@ module Unobtainium
53
57
 
54
58
  ##
55
59
  # Wait for multiple elements. Each argument is a Hash of selector options
56
- # that are passed to #find_element. If one argument contains keys from
57
- # the DEFAULT_OPTIONS Hash, it is instead treated as an options Hash for
58
- # the #multiwait method.
60
+ # that are passed to options[:find_method]. If one argument contains keys
61
+ # from the DEFAULT_OPTIONS Hash, it is instead treated as an options Hash
62
+ # for the #multiwait method.
59
63
  # @return Array of found elements or nil entries if no matching element
60
64
  # was found.
61
- # FIXME: recheck this!
62
65
  def multiwait(*args)
63
66
  # Parse options
64
67
  options, selectors = multiwait_parse_options(*args)
@@ -68,6 +71,7 @@ module Unobtainium
68
71
  raise_on_error: options[:raise_on_error],
69
72
  return_errors: options[:return_error],
70
73
  check_element: options[:check_element],
74
+ find_method: options[:find_method],
71
75
  }
72
76
 
73
77
  # Wait for elements
@@ -183,4 +187,5 @@ end # module Unobtainium
183
187
 
184
188
  ::Unobtainium::Driver.register_module(
185
189
  ::Unobtainium::MultiWait::DriverModule,
186
- __FILE__)
190
+ __FILE__
191
+ )
@@ -9,6 +9,6 @@
9
9
  module Unobtainium
10
10
  module MultiWait
11
11
  # The current release version
12
- VERSION = "0.1.0".freeze
12
+ VERSION = "0.2.0".freeze
13
13
  end # module MultiWait
14
14
  end # module Unobtainium
@@ -162,7 +162,8 @@ describe 'Unobtainium::MultiWait::DriverModule' do
162
162
  expect(elems[0]).not_to be_nil
163
163
  expect(elems[1]).not_to be_nil
164
164
  is_error = elems[0].is_a?(
165
- ::Selenium::WebDriver::Error::TimeOutError)
165
+ ::Selenium::WebDriver::Error::TimeOutError
166
+ )
166
167
  expect(is_error).to be_truthy
167
168
  end
168
169
 
@@ -41,7 +41,7 @@ Gem::Specification.new do |spec|
41
41
  spec.requirements = "Unobtainium driver implementing the Selenium API"
42
42
 
43
43
  spec.add_development_dependency "bundler", "~> 1.12"
44
- spec.add_development_dependency "rubocop", "~> 0.39"
44
+ spec.add_development_dependency "rubocop", "~> 0.40"
45
45
  spec.add_development_dependency "rake", "~> 11.1"
46
46
  spec.add_development_dependency "rspec", "~> 3.4"
47
47
  spec.add_development_dependency "simplecov", "~> 0.11"
@@ -50,7 +50,7 @@ Gem::Specification.new do |spec|
50
50
  spec.add_development_dependency "phantomjs"
51
51
 
52
52
  spec.add_dependency "unobtainium", "~> 0.5"
53
- spec.add_dependency "unobtainium-multifind", "~> 0.2"
53
+ spec.add_dependency "unobtainium-multifind", "~> 0.3"
54
54
  end
55
55
  # rubocop:enable Style/SpaceAroundOperators
56
56
  # rubocop:enable Style/UnneededPercentQ, Style/ExtraSpacing
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unobtainium-multiwait
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Finkhaeuser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-09 00:00:00.000000000 Z
11
+ date: 2016-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.39'
33
+ version: '0.40'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.39'
40
+ version: '0.40'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '0.2'
145
+ version: '0.3'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '0.2'
152
+ version: '0.3'
153
153
  description: "\n This gem provides a driver module for unobtainium allowing for
154
154
  more easily\n waiting for (one of) multiple elements to change state.\n\n It
155
155
  is based on the unobtainium-multifind gem.\n "