testa_appium_driver 0.1.22 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b34762a1e6c7413f1aeffa1df4125bc06c17d5299560b4e3ce018672b3891ac9
|
4
|
+
data.tar.gz: 132bb3665d961f7e6848384d5578bd1f5cafccf0ecd6a02ce01c971a182d4102
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27d9d7344062f9eb6ba08523130ea8b76a96d4250832b3cb37db91f49601c9d43249911590b5f67700715b91f805c016328dfa69accd2a297f4c76510dc68857
|
7
|
+
data.tar.gz: f9361dd73b87f8d807dc4a58fba6b86782fa161ccb98d927073720616875219a0bb01e6d7642e8f2787defb8b4c7c404e09eca0b7df2b6998fb86b864a82c6fe
|
data/Gemfile.lock
CHANGED
@@ -26,6 +26,7 @@ module ::TestaAppiumDriver
|
|
26
26
|
end
|
27
27
|
|
28
28
|
if @driver.ios?
|
29
|
+
# if true
|
29
30
|
w3c_scroll_each_ios(direction, align_with, &block)
|
30
31
|
else
|
31
32
|
w3c_scroll_each_android(direction, align_with, &block)
|
@@ -182,10 +183,18 @@ module ::TestaAppiumDriver
|
|
182
183
|
max_attempts = 3 if max_attempts.nil? || max_attempts <= 0
|
183
184
|
# $ctx.puts("Is aligned: #{is_aligned?(with, element)}")
|
184
185
|
timeout = 0
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
186
|
+
stale_retries = 0
|
187
|
+
begin
|
188
|
+
until is_aligned?(with, element) || timeout == max_attempts
|
189
|
+
# $ctx.puts("align roudn: #{timeout}")
|
190
|
+
w3c_attempt_align(with, speed_coef)
|
191
|
+
timeout += 1
|
192
|
+
end
|
193
|
+
rescue Selenium::WebDriver::Error::StaleElementReferenceError
|
194
|
+
# if boundElementsByIndex is enabled, we can get stale element reference while doing scroll each
|
195
|
+
stale_retries += 1
|
196
|
+
element = @locator.execute if @locator.instance_of?(TestaAppiumDriver::Locator)
|
197
|
+
retry if stale_retries < 2
|
189
198
|
end
|
190
199
|
# $ctx.puts("end align")
|
191
200
|
end
|
@@ -196,11 +196,15 @@ module ::TestaAppiumDriver
|
|
196
196
|
end
|
197
197
|
end
|
198
198
|
|
199
|
-
def drag_to(
|
200
|
-
|
199
|
+
def drag_to(x, y)
|
200
|
+
b = @locator.bounds
|
201
|
+
coords = b.center
|
202
|
+
w3c_drag_to(coords.x, coords.y, x, y)
|
201
203
|
end
|
202
204
|
|
203
205
|
|
206
|
+
|
207
|
+
|
204
208
|
def is_aligned?(with, element)
|
205
209
|
align_bounds = @locator.bounds(force_cache_element: element)
|
206
210
|
case with
|
data/testa_appium_driver.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testa_appium_driver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- karlo.razumovic
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appium_lib_core
|