watirsome 0.2.0 → 0.2.1

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: c6f0438dee5cca61ecdc5c88626d2ba92acb1588
4
- data.tar.gz: 544532f54c7f84faaac5368bd317fbda8fac45bf
3
+ metadata.gz: 5fa8e7d26089505c8a179c6f73902bd3dd7db057
4
+ data.tar.gz: 90136197a30af82840ff96b2732dfc7b067ec4bb
5
5
  SHA512:
6
- metadata.gz: bcf87becd8a08ccd1fbee22c583d7805ace58eed9fb768498cad864cc12cc1b03ce22817e35fceabd71fc1e415ae8bc67d2ac8b45b2d7bd8fb78bdae316de3ac
7
- data.tar.gz: 84c964b0e353c55ce4625d1adfe2d3778dd6d4e46db3f40548dd1650e167610531aee93f603646ea34cf27e9e72cbf269feb322244a73406489e8aefefa0db2b
6
+ metadata.gz: ad061961a128224953286fef6302d4da1d537312fcc528c93466c300696a23652673508380c1b451e07db4adb448e9def4b1fbcd514de0d17cf723351b7be607
7
+ data.tar.gz: c77dd3c4fdae2a45e30a6a8f285c8b13c06f7c4689e543367726f022c9436720fc3b2ff3a383f3f144bf07da59cd682e76cbaf6e9f0453a5a0d59c23606068ce
@@ -1,5 +1,7 @@
1
1
  module Watirsome
2
2
  module Accessors
3
+ SKIP_CUSTOM_SELECTORS = %i[visible].freeze
4
+
3
5
  module ClassMethods
4
6
  #
5
7
  # Iterate through Watir continer methods and define all necessary
@@ -164,7 +166,8 @@ module Watirsome
164
166
  custom_arg = {}
165
167
  if hashes && !hashes.is_a?(Proc)
166
168
  hashes.each do |k, v|
167
- if Watir.element_class_for(method).instance_methods.include? :"#{k}?"
169
+ element_methods = Watir.element_class_for(method).instance_methods
170
+ if element_methods.include?(:"#{k}?") && !SKIP_CUSTOM_SELECTORS.include?(k)
168
171
  custom_arg[k] = identifier[index][k]
169
172
  else
170
173
  watir_arg[k] = v
@@ -1,3 +1,3 @@
1
1
  module Watirsome
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  end # Watirsome
data/lib/watirsome.rb CHANGED
@@ -61,11 +61,13 @@
61
61
  #
62
62
  # div :visible, class: 'visible', visible: true
63
63
  # div :invisible, class: 'visible', visible: false
64
+ # select_list :country, selected: 'USA'
64
65
  # end
65
66
  #
66
67
  # page = Page.new(@browser)
67
68
  # page.visible_div.visible? #=> true
68
69
  # page.invisible_div.visible? #=> false
70
+ # page.country_select_list.selected?('USA') #=> true
69
71
  #
70
72
  module Watirsome
71
73
  class << self
data/support/doctest.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <div>
6
6
  <input type="text" placeholder="Enter your name" />
7
7
  <select name="Country">
8
- <option value="USA">USA</option>
8
+ <option value="USA" selected="true">USA</option>
9
9
  <option value="Russia">Russia</option>
10
10
  </select>
11
11
  <input type="checkbox" name="I Agree" />
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watirsome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Rodionov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-21 00:00:00.000000000 Z
11
+ date: 2017-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: watir
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.4.5.1
110
+ rubygems_version: 2.5.2
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Awesome page objects with Watir