meglish 1.0.14 → 1.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/meglish.rb +20 -0
- 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: 5a4f89f13b1dedf4cd201232a9f1de09bb1678f1
|
4
|
+
data.tar.gz: 9dff2269d2ae76935ea4fd90070a8d672e3f26b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 588a48ac5ac552c4560dcf9bfdd72f51911d192e751df6609fd08e1f12024e023e3cc579af671e46629a1f4be8b1d28ac502210a51c4bd92093b7c96a988b8b9
|
7
|
+
data.tar.gz: 89a406f0de1ddf809ddf7a2d229b05de5fcc9c1ee18cf83badea9e7e6141a54bc1de47ffee2458d2df31826599cbf95d4971fe85ef94d7e81e063b9d3156f2a3
|
data/lib/meglish.rb
CHANGED
@@ -132,6 +132,16 @@ module Meglish
|
|
132
132
|
touch_element("DropDownListView child CustomFontTextView text:'#{_text}'", _options)
|
133
133
|
end
|
134
134
|
|
135
|
+
def swipe_down(_scroll_amount)
|
136
|
+
if _scroll_amount < 4
|
137
|
+
_scroll_amount = 5
|
138
|
+
elsif _scroll_amount >= 50
|
139
|
+
_scroll_amount = 49
|
140
|
+
end
|
141
|
+
down = 50 + _scroll_amount
|
142
|
+
perform_action('drag', 50, 50, 50, down, 5)
|
143
|
+
end
|
144
|
+
|
135
145
|
def swipe_left(_query)
|
136
146
|
has_element = query(_query + ' parent HorizontalScrollView')
|
137
147
|
_query = has_element.empty? ? _query : _query + ' parent HorizontalScrollView'
|
@@ -144,6 +154,16 @@ module Meglish
|
|
144
154
|
pan_right(query_string: _query)
|
145
155
|
end
|
146
156
|
|
157
|
+
def swipe_up(_scroll_amount)
|
158
|
+
if _scroll_amount < 4
|
159
|
+
_scroll_amount = 5
|
160
|
+
elsif _scroll_amount >= 50
|
161
|
+
_scroll_amount = 49
|
162
|
+
end
|
163
|
+
up = 50 + _scroll_amount
|
164
|
+
perform_action('drag', 50, 50, up, 50, 5)
|
165
|
+
end
|
166
|
+
|
147
167
|
def text_element(_query, _options = {})
|
148
168
|
get_element(_query, _options)['text']
|
149
169
|
end
|