superbara 0.14.0 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/superbara.rb +5 -1
- data/lib/superbara/dsl.rb +17 -0
- data/lib/superbara/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a02b6bfd273cbffc96fd81528dd4ebe9e6641a7c14d33705134f7db8e206fac
|
4
|
+
data.tar.gz: ea42018036a97edc853c6ddfacaef08f78a62cd22647819725bbc4db532c2a86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 584b61e65fdb59e708633f8599ef2574958f7d1a7c20f0882fe0a0aec215f11f9a3d0268f7d45595c60d65617435a7a446c0481c2ff757fa8c9d2960523407d2
|
7
|
+
data.tar.gz: 6dbc0ba71ddb58e435dcddcc3a14764a6391b301344f2c906fce06bc2a013c319238261585229342981d2eeffad77f8e9f17c7774b6f1ee5ed18ea4d414ef146
|
data/Gemfile.lock
CHANGED
data/lib/superbara.rb
CHANGED
@@ -169,7 +169,11 @@ module Superbara
|
|
169
169
|
puts ""
|
170
170
|
print "Error: ".colorize(:red)
|
171
171
|
puts ex.message.split(" for #<Superbara::Context").first
|
172
|
-
|
172
|
+
if ex.backtrace_locations
|
173
|
+
puts " in #{ex.backtrace_locations.first.path}:#{ex.backtrace_locations.first.lineno}"
|
174
|
+
else
|
175
|
+
# for example <Selenium::WebDriver::Error::StaleElementReferenceError>
|
176
|
+
end
|
173
177
|
end
|
174
178
|
|
175
179
|
def self.print_tag_skip(ex)
|
data/lib/superbara/dsl.rb
CHANGED
@@ -61,6 +61,22 @@ module Superbara; module DSL
|
|
61
61
|
value
|
62
62
|
end
|
63
63
|
|
64
|
+
def all(*args)
|
65
|
+
elements = super *args
|
66
|
+
if elements && Superbara.visual?
|
67
|
+
for elem in elements[0..4]
|
68
|
+
elem.show styles: [{
|
69
|
+
"border" => "10px dashed Red"
|
70
|
+
}]
|
71
|
+
end
|
72
|
+
|
73
|
+
if elements.size > 5
|
74
|
+
Superbara.toast "and #{elements.size-5} more"
|
75
|
+
end
|
76
|
+
end
|
77
|
+
elements
|
78
|
+
end
|
79
|
+
|
64
80
|
def find_text(text)
|
65
81
|
text.downcase!
|
66
82
|
|
@@ -77,6 +93,7 @@ return Array.from(
|
|
77
93
|
end
|
78
94
|
|
79
95
|
def click_text(text)
|
96
|
+
Superbara.output "clicking text '#{text}'"
|
80
97
|
find_text(text)&.click
|
81
98
|
end
|
82
99
|
|
data/lib/superbara/version.rb
CHANGED