watir-customize_elements 0.0.1 → 0.0.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/watir-customize_elements.rb +33 -10
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c983aeb021cf78608707cf4dda2908a783646d8
4
- data.tar.gz: 28f31d487bd25e37c10fc2cf41ae3ddb6449f308
3
+ metadata.gz: ae77be9dd057f4340260e98945307560b7503a34
4
+ data.tar.gz: cd231edebb10c83a5a5c7253e26c5c21eb3aebd7
5
5
  SHA512:
6
- metadata.gz: 345f1f7bd82a8728ebd08131020ca831e735f86e2dc98ac45923fab25c248a3029d9491120c0e2a98ab3a7e9202cfd11bf5e005e5a6c87d5f0b798e8046b7477
7
- data.tar.gz: 8aaabd4cd1793763c84bcd1075d5461b296c5c54f732b3f893ce4dc2bea7c1f47c5e277b22d5d7325f41ef0d28864739f50db7efde1d6a9c0006b2016bafaf4d
6
+ metadata.gz: 74093a5376aa810eb9fc2eef6612797eefe6ec7bdc1f776418f4c3e9a28cf2a2b854c7a19d5b8e902c6327d82146abbf84832f55effa8f82f53e026d3ecdec2d
7
+ data.tar.gz: 4e70d958eadc546bdea0b6ace8c25bbc7f1ab1e1dce73c109c7fae2a56247fc28a4d9dba8eaecd28dc51102f438e4f51ec6942727f711b67b4abd34544495b02
@@ -59,16 +59,39 @@ unless WatirCustomizeElements.custom_elements.nil?
59
59
  module Watir
60
60
  # Expanding the case statement in the normalize_selector method to include custom attributes,
61
61
  # since the custom element does not recognize all attributes by default.
62
- class ElementLocator
63
- alias :old_normalize_selector :normalize_selector
64
-
65
- def normalize_selector(how, what)
66
- case how
67
- # supporting "name" attribute
68
- when :name
69
- [how, what]
70
- else
71
- old_normalize_selector(how, what)
62
+ if Gem.loaded_specs["watir-webdriver"].version <= Gem::Version.create('0.9.1')
63
+ class ElementLocator
64
+ alias :old_normalize_selector :normalize_selector
65
+
66
+ def normalize_selector(how, what)
67
+ case how
68
+ # supporting "name" attribute
69
+ when :name
70
+ [how, what]
71
+ else
72
+ old_normalize_selector(how, what)
73
+ end
74
+ end
75
+ end
76
+ else
77
+ module Locators
78
+ class Element
79
+
80
+ # Expanding the case statement in the normalize_selector method to include custom attributes,
81
+ # since the custom element does not recognize all attributes by default.
82
+ class SelectorBuilder
83
+ alias :old_normalize_selector :normalize_selector
84
+
85
+ def normalize_selector(how, what)
86
+ case how
87
+ # supporting "name" attribute
88
+ when :name
89
+ [how, what]
90
+ else
91
+ old_normalize_selector(how, what)
92
+ end
93
+ end
94
+ end
72
95
  end
73
96
  end
74
97
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir-customize_elements
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yehuda Miller, Shani Raby, Matan Goren, Ronnie Harpaz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-31 00:00:00.000000000 Z
11
+ date: 2016-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: watir-webdriver
@@ -42,7 +42,7 @@ description: Automatically instantiates custom HTML tag names into watir-webdriv
42
42
  and\or page-object gem.
43
43
  email:
44
44
  - matan.goren@myheritage.com
45
- - yehuda.miller@myheritage.com
45
+ - yehudafmiller@gmail.com
46
46
  executables: []
47
47
  extensions: []
48
48
  extra_rdoc_files: []