polyblock 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/polyblock/capybara_helpers.rb +6 -0
- data/lib/polyblock/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 947b0723880102d7e82a3d228d5e4c0270601351
|
4
|
+
data.tar.gz: 84c8875fe44882bc85bcce858efda5d79d339ae5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73a51a9c3638d376a4c5e84bab2ba682bd1b1c8ff38780ca326a262b8e1e903d9d6e40b1658984941f989bcfc946c01d93b90970f6e23d0811f608c3e5725711
|
7
|
+
data.tar.gz: 543d525f6306b43d8e68441ab0b53bbbd8331a40a03016cd475e3c479c18a120b5df8604ed13cf20b4b564ef11405ce3370a1187d17e7faaf27ef9776c3b79b0
|
@@ -9,6 +9,12 @@ module Polyblock
|
|
9
9
|
# elsif page.has_css? 'label', text: locator
|
10
10
|
elsif page.evaluate_script("$(\"label:contains('#{locator}')\").is('*')")
|
11
11
|
locator = find('label', text: locator)[:for]
|
12
|
+
elsif page.evaluate_script("$(\"label:contains('#{locator.titleize}')\").is('*')")
|
13
|
+
locator = find('label', text: locator.titleize)[:for]
|
14
|
+
elsif page.evaluate_script((
|
15
|
+
sel = "$(\"label[for$='_#{locator.underscore}_attributes_content']\")"
|
16
|
+
) + '.is("*")')
|
17
|
+
locator = find('label', text: page.evaluate_script(sel+'.text()'))[:for]
|
12
18
|
else
|
13
19
|
raise "Locator #{locator} not found!!"
|
14
20
|
end
|
data/lib/polyblock/version.rb
CHANGED