mini_autobot 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mini_autobot/utils/page_object_helper.rb +15 -0
- data/lib/mini_autobot/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 450c062a5d8552df67d74eabc30a98985cc486b6
|
4
|
+
data.tar.gz: 3873f47a095042190509d027abdb4a9df7ba773b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a4d9406f93ed67b7f4be16c645406e286a92da76909adbf50b2f6ce8bd00c417a3af17b45e6bb9220de7807e9d9b03507436f17b5c76a30341892907246d88c
|
7
|
+
data.tar.gz: 4ae84816a493fb8ad624874bb7e868e4a1679be3197b4ece58b0e1c7eb12b99d2df8f337fa1401b30453e769fcedd92fb6501494f58739bbb2e61e096e5ec666
|
@@ -146,6 +146,21 @@ module MiniAutobot
|
|
146
146
|
return value
|
147
147
|
end
|
148
148
|
|
149
|
+
# Retry a block of code for a number of times
|
150
|
+
def retry_with_count(count, &block)
|
151
|
+
try = 0
|
152
|
+
count.times do
|
153
|
+
try += 1
|
154
|
+
begin
|
155
|
+
block.call
|
156
|
+
return true
|
157
|
+
rescue Exception => e
|
158
|
+
MiniAutobot.logger.warn "Exception: #{e}\nfrom\n#{block.source_location.join(':')}"
|
159
|
+
MiniAutobot.logger.warn "Retrying" if try < count
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
149
164
|
# Check if a web element exists on page or not, without wait
|
150
165
|
def is_element_present?(how, what, driver = nil)
|
151
166
|
element_appeared?(how, what, driver)
|
data/lib/mini_autobot/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mini_autobot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ripta Pasay
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-08-
|
13
|
+
date: 2015-08-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|