SurfCustomCalabash 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1233f86a1afab59432539f0488d1d02cd3ed5aa5
|
4
|
+
data.tar.gz: cf180dd1f054eb76e65160aefa04a17e7525a707
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af2cdcb154b0ea5d21c7429348de920654b7bd360b14ee904401d2fc363b176ebfb0a188676f6ffc4c11553a3af2cd6723a40a314d64efa116b6938e4a785b2e
|
7
|
+
data.tar.gz: cda894ea7873a46fc361602c827baea1e4f0575575bac5e739d3182462880bc4563153171d2c9660eac5f85ece44a9d66d45f007acee899d9b7fd957258b46fb
|
@@ -40,6 +40,12 @@ module CommonMethods
|
|
40
40
|
wait_for_element_does_not_exist(element, :timeout=>15)
|
41
41
|
end
|
42
42
|
|
43
|
+
# wait trait-element on screen
|
44
|
+
def wait_for_screen
|
45
|
+
wait_for_elements_exist(trait, :timeout=>25)
|
46
|
+
end
|
47
|
+
|
48
|
+
# ----------------------------------------------------Custom Swipe----------------------------------------------------
|
43
49
|
def strong_swipe_until_not_exist(dir, element_destination)
|
44
50
|
until_element_does_not_exist(element_destination,
|
45
51
|
:action => lambda{strong_swipe(dir)})
|
@@ -149,6 +155,13 @@ module CommonMethods
|
|
149
155
|
return get_random_text_string(7) + "@" + get_random_text_string(2) + ".test"
|
150
156
|
end
|
151
157
|
|
158
|
+
# get first digital from string
|
159
|
+
def extract_num_from_str(text)
|
160
|
+
text.gsub!(/[[:space:]]/, '')
|
161
|
+
num = text.scan(/\d+/).first.nil? ? "0" : text.scan(/\d+/).first
|
162
|
+
p num
|
163
|
+
end
|
164
|
+
|
152
165
|
# get text from first element
|
153
166
|
def remember(element)
|
154
167
|
wait_for_element_exists(element, :timeout => 5)
|
@@ -205,6 +218,14 @@ module CommonMethods
|
|
205
218
|
return cross
|
206
219
|
end
|
207
220
|
|
221
|
+
# swipe down if two element cross
|
222
|
+
def swipe_if_cross(element_front, element_behind)
|
223
|
+
if cross_coordinate(element_front, element_behind)
|
224
|
+
light_swipe("down")
|
225
|
+
end
|
226
|
+
sleep(1)
|
227
|
+
end
|
228
|
+
|
208
229
|
# if apps support two localization, this method check exists text in different locations
|
209
230
|
def text_with_locale(text_locale1, text_locale2)
|
210
231
|
if element_exists("* {text BEGINSWITH '#{text_locale2}'}")
|
@@ -76,6 +76,12 @@ module DroidMethods
|
|
76
76
|
end
|
77
77
|
end
|
78
78
|
|
79
|
+
# swipe trait-element from element_destination
|
80
|
+
def light_swipe_trait_until_exists(dir, element_destination)
|
81
|
+
until_element_exists(element_destination,
|
82
|
+
:action => lambda{light_swipe_element(trait, dir)}, :timeout=>50)
|
83
|
+
end
|
84
|
+
|
79
85
|
# pull-to-refresh screen
|
80
86
|
def ptr
|
81
87
|
perform_action('drag', 50, 50, 15, 75, 4)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: SurfCustomCalabash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexey Hripunov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|