testa_appium_driver 0.1.14 → 0.1.15
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 +4 -4
- data/.gitattributes +0 -0
- data/.gitignore +2 -1
- data/Gemfile.lock +3 -3
- data/lib/testa_appium_driver/common/locator.rb +7 -3
- data/lib/testa_appium_driver/common/scroll_actions/w3c_scroll_actions.rb +1 -1
- data/lib/testa_appium_driver/common/scroll_actions.rb +17 -4
- data/lib/testa_appium_driver/driver.rb +8 -1
- data/lib/testa_appium_driver/ios/selenium_element.rb +1 -0
- data/lib/testa_appium_driver/version.rb +1 -1
- data/testa_appium_driver.gemspec +1 -1
- metadata +6 -7
- data/appium-driver.iml +0 -72
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1bc732c1a27c05473fb61ac8c8e6315f4f5349d50b646a99c8d74b0fb8110f5
|
4
|
+
data.tar.gz: 994b66f0f5c32ceabdaddbf9abede544380175ed45e1520026ccebf010f8180c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a424583a9cac3ea99d507ff72a8c9540a0727fc2402b8c9199528710cce89a6b2f15d627a9e5b29eeae3fa39414fade181a39281a0243c89435fc3ca5e589feb
|
7
|
+
data.tar.gz: ce2a9ba06bd9b56eb95b4d633262ed6a0e9a7e5316a251d2760d84888a03e3dcabdbe2e506ed96db4918e61e9fe069e3478cb14e53584cac4d9e0b3e41dcb45f
|
data/.gitattributes
CHANGED
File without changes
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
testa_appium_driver (0.1.
|
5
|
-
appium_lib_core (
|
4
|
+
testa_appium_driver (0.1.14)
|
5
|
+
appium_lib_core (~> 5.1.0)
|
6
6
|
json (~> 2.3)
|
7
7
|
|
8
8
|
GEM
|
@@ -71,4 +71,4 @@ DEPENDENCIES
|
|
71
71
|
testa_appium_driver!
|
72
72
|
|
73
73
|
BUNDLED WITH
|
74
|
-
2.
|
74
|
+
2.3.14
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative 'locator/scroll_actions'
|
2
2
|
|
3
3
|
|
4
|
-
module TestaAppiumDriver
|
4
|
+
module ::TestaAppiumDriver
|
5
5
|
#noinspection RubyTooManyInstanceVariablesInspection,RubyTooManyMethodsInspection
|
6
6
|
class Locator
|
7
7
|
include Helpers
|
@@ -184,13 +184,13 @@ module TestaAppiumDriver
|
|
184
184
|
_wait(:until, args)
|
185
185
|
end
|
186
186
|
|
187
|
-
|
188
187
|
# all timeouts are disabled before check, and enabled after check
|
189
188
|
# @return [boolean] true if it exists in the page regardless if visible or not
|
190
189
|
def exists?
|
191
190
|
found = true
|
192
191
|
begin
|
193
|
-
execute(skip_cache: true, ignore_implicit_wait: true)
|
192
|
+
r = execute(skip_cache: true, ignore_implicit_wait: true)
|
193
|
+
return r.count.positive? if r.is_a?(Array)
|
194
194
|
rescue StandardError
|
195
195
|
found = false
|
196
196
|
end
|
@@ -303,6 +303,10 @@ module TestaAppiumDriver
|
|
303
303
|
@driver.first_and_last_leaf(execute)
|
304
304
|
end
|
305
305
|
|
306
|
+
def first_and_last_child
|
307
|
+
@driver.first_and_last_child(execute)
|
308
|
+
end
|
309
|
+
|
306
310
|
def double_click(x = nil, y = nil)
|
307
311
|
click(x,y, double: true)
|
308
312
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require_relative 'scroll_actions/json_wire_scroll_actions'
|
2
2
|
require_relative 'scroll_actions/w3c_scroll_actions'
|
3
3
|
|
4
|
-
module TestaAppiumDriver
|
4
|
+
module ::TestaAppiumDriver
|
5
5
|
|
6
6
|
# Class for handling scroll actions
|
7
7
|
class ScrollActions
|
@@ -221,9 +221,22 @@ module TestaAppiumDriver
|
|
221
221
|
|
222
222
|
|
223
223
|
def is_end_of_scroll?
|
224
|
-
|
225
|
-
|
226
|
-
|
224
|
+
if @driver.device == :android
|
225
|
+
# $__ctx.puts "end_of_scroll?"
|
226
|
+
# $__ctx.puts "old: #{@previous_elements}"
|
227
|
+
# $__ctx.puts "device: #{@driver.device}"
|
228
|
+
|
229
|
+
old_elements = @previous_elements
|
230
|
+
@previous_elements = @scrollable.first_and_last_leaf
|
231
|
+
# $__ctx.puts "new: #{@previous_elements}"
|
232
|
+
|
233
|
+
old_elements == @previous_elements
|
234
|
+
else
|
235
|
+
# for is, check location of first and last elements
|
236
|
+
old_elements = @previous_elements
|
237
|
+
@previous_elements = @scrollable.first_and_last_child&.map(&:location)
|
238
|
+
old_elements == @previous_elements
|
239
|
+
end
|
227
240
|
end
|
228
241
|
|
229
242
|
def default_deadzone!
|
@@ -10,7 +10,7 @@ require_relative 'common/locator'
|
|
10
10
|
require_relative 'common/scroll_actions'
|
11
11
|
require_relative 'common/selenium_element'
|
12
12
|
|
13
|
-
module TestaAppiumDriver
|
13
|
+
module ::TestaAppiumDriver
|
14
14
|
class Driver
|
15
15
|
include Helpers
|
16
16
|
|
@@ -300,6 +300,13 @@ module TestaAppiumDriver
|
|
300
300
|
[elements[0], elements[-1]]
|
301
301
|
end
|
302
302
|
|
303
|
+
def first_and_last_child(from_element = @driver)
|
304
|
+
elements = from_element.find_elements(xpath: "./*")
|
305
|
+
return nil if elements.count == 0
|
306
|
+
|
307
|
+
[elements[0], elements[-1]]
|
308
|
+
end
|
309
|
+
|
303
310
|
private
|
304
311
|
def extend_for(device, automation_name)
|
305
312
|
case device
|
data/testa_appium_driver.gemspec
CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
31
31
|
spec.require_paths = ["lib"]
|
32
32
|
|
33
|
-
spec.add_runtime_dependency "appium_lib_core", ["
|
33
|
+
spec.add_runtime_dependency "appium_lib_core", ["~> 5.2.0"]
|
34
34
|
spec.add_runtime_dependency "json", ["~> 2.3"]
|
35
35
|
|
36
36
|
spec.add_development_dependency "rubocop", ["= 1.19.0"]
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
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.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- karlo.razumovic
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appium_lib_core
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 5.
|
19
|
+
version: 5.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 5.
|
26
|
+
version: 5.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,7 +86,6 @@ files:
|
|
86
86
|
- LICENSE.txt
|
87
87
|
- README.md
|
88
88
|
- Rakefile
|
89
|
-
- appium-driver.iml
|
90
89
|
- bin/console
|
91
90
|
- bin/setup
|
92
91
|
- lib/testa_appium_driver.rb
|
data/appium-driver.iml
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<module type="RUBY_MODULE" version="4">
|
3
|
-
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
4
|
-
<exclude-output />
|
5
|
-
<content url="file://$MODULE_DIR$">
|
6
|
-
<sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
|
7
|
-
<sourceFolder url="file://$MODULE_DIR$/spec" isTestSource="true" />
|
8
|
-
</content>
|
9
|
-
<orderEntry type="jdk" jdkName="RVM: ruby-2.7.6" jdkType="RUBY_SDK" />
|
10
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
11
|
-
<orderEntry type="library" scope="PROVIDED" name="appium_lib_core (v5.1.0, RVM: ruby-2.7.6) [gem]" level="application" />
|
12
|
-
<orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, RVM: ruby-2.7.6) [gem]" level="application" />
|
13
|
-
<orderEntry type="library" scope="PROVIDED" name="childprocess (v4.1.0, RVM: ruby-2.7.6) [gem]" level="application" />
|
14
|
-
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.5.0, RVM: ruby-2.7.6) [gem]" level="application" />
|
15
|
-
<orderEntry type="library" scope="PROVIDED" name="eventmachine (v1.2.7, RVM: ruby-2.7.6) [gem]" level="application" />
|
16
|
-
<orderEntry type="library" scope="PROVIDED" name="faye-websocket (v0.11.1, RVM: ruby-2.7.6) [gem]" level="application" />
|
17
|
-
<orderEntry type="library" scope="PROVIDED" name="json (v2.6.2, RVM: ruby-2.7.6) [gem]" level="application" />
|
18
|
-
<orderEntry type="library" scope="PROVIDED" name="parallel (v1.22.1, RVM: ruby-2.7.6) [gem]" level="application" />
|
19
|
-
<orderEntry type="library" scope="PROVIDED" name="parser (v3.1.2.0, RVM: ruby-2.7.6) [gem]" level="application" />
|
20
|
-
<orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, RVM: ruby-2.7.6) [gem]" level="application" />
|
21
|
-
<orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, RVM: ruby-2.7.6) [gem]" level="application" />
|
22
|
-
<orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.4.0, RVM: ruby-2.7.6) [gem]" level="application" />
|
23
|
-
<orderEntry type="library" scope="PROVIDED" name="rexml (v3.2.5, RVM: ruby-2.7.6) [gem]" level="application" />
|
24
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec (v3.11.0, RVM: ruby-2.7.6) [gem]" level="application" />
|
25
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.11.0, RVM: ruby-2.7.6) [gem]" level="application" />
|
26
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.11.0, RVM: ruby-2.7.6) [gem]" level="application" />
|
27
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.11.1, RVM: ruby-2.7.6) [gem]" level="application" />
|
28
|
-
<orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.11.0, RVM: ruby-2.7.6) [gem]" level="application" />
|
29
|
-
<orderEntry type="library" scope="PROVIDED" name="rubocop (v1.26.0, RVM: ruby-2.7.6) [gem]" level="application" />
|
30
|
-
<orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.18.0, RVM: ruby-2.7.6) [gem]" level="application" />
|
31
|
-
<orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.11.0, RVM: ruby-2.7.6) [gem]" level="application" />
|
32
|
-
<orderEntry type="library" scope="PROVIDED" name="rubyzip (v2.3.2, RVM: ruby-2.7.6) [gem]" level="application" />
|
33
|
-
<orderEntry type="library" scope="PROVIDED" name="selenium-webdriver (v4.1.0, RVM: ruby-2.7.6) [gem]" level="application" />
|
34
|
-
<orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.1.0, RVM: ruby-2.7.6) [gem]" level="application" />
|
35
|
-
<orderEntry type="library" scope="PROVIDED" name="websocket-driver (v0.7.5, RVM: ruby-2.7.6) [gem]" level="application" />
|
36
|
-
<orderEntry type="library" scope="PROVIDED" name="websocket-extensions (v0.1.5, RVM: ruby-2.7.6) [gem]" level="application" />
|
37
|
-
</component>
|
38
|
-
<component name="RakeTasksCache">
|
39
|
-
<option name="myRootTask">
|
40
|
-
<RakeTaskImpl id="rake">
|
41
|
-
<subtasks>
|
42
|
-
<RakeTaskImpl description="Build testa_appium_driver-0.1.131.gem into the pkg directory" fullCommand="build" id="build" />
|
43
|
-
<RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
|
44
|
-
<RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
|
45
|
-
<RakeTaskImpl description="Build and install testa_appium_driver-0.1.131.gem into system gems" fullCommand="install" id="install" />
|
46
|
-
<RakeTaskImpl id="install">
|
47
|
-
<subtasks>
|
48
|
-
<RakeTaskImpl description="Build and install testa_appium_driver-0.1.131.gem into system gems without network access" fullCommand="install:local" id="local" />
|
49
|
-
</subtasks>
|
50
|
-
</RakeTaskImpl>
|
51
|
-
<RakeTaskImpl description="Create tag v0.1.131 and build and push testa_appium_driver-0.1.131.gem to rubygems.org" fullCommand="release[remote]" id="release[remote]" />
|
52
|
-
<RakeTaskImpl description="Run RuboCop" fullCommand="rubocop" id="rubocop" />
|
53
|
-
<RakeTaskImpl id="rubocop">
|
54
|
-
<subtasks>
|
55
|
-
<RakeTaskImpl description="Auto-correct RuboCop offenses" fullCommand="rubocop:auto_correct" id="auto_correct" />
|
56
|
-
</subtasks>
|
57
|
-
</RakeTaskImpl>
|
58
|
-
<RakeTaskImpl description="Run RSpec code examples" fullCommand="spec" id="spec" />
|
59
|
-
<RakeTaskImpl description="" fullCommand="default" id="default" />
|
60
|
-
<RakeTaskImpl description="" fullCommand="release" id="release" />
|
61
|
-
<RakeTaskImpl id="release">
|
62
|
-
<subtasks>
|
63
|
-
<RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
|
64
|
-
<RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
|
65
|
-
<RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
|
66
|
-
</subtasks>
|
67
|
-
</RakeTaskImpl>
|
68
|
-
</subtasks>
|
69
|
-
</RakeTaskImpl>
|
70
|
-
</option>
|
71
|
-
</component>
|
72
|
-
</module>
|