appium_lib_core 6.4.1 → 6.4.2
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/CHANGELOG.md +5 -0
- data/appium_lib_core.gemspec +1 -1
- data/lib/appium_lib_core/android/device.rb +37 -0
- data/lib/appium_lib_core/common/base/http_default.rb +7 -31
- data/lib/appium_lib_core/version.rb +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1753dcab9078704c59e4b7a4201f99adbc578945a499c76e033a9c2f2bbc2393
|
|
4
|
+
data.tar.gz: 73571aa53628ebd31d7e784fa970c458a5935e1a137fe5861e0988ebb1838f58
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e8f12a34ec0eb4d0db97ee01a4e4f49b64d4599733b7d9907c6f1edc63d2e4daadfea0e763d9e430c712a31f7f6aea438ca4a2fa4f40f55167380c7fc747f12
|
|
7
|
+
data.tar.gz: 87517cf452bfcc9a87d244eed4278ad3fb157991bdada3517e21695710c059126603f520231d700b9cc22e58198ab085220866803d132985302835aecef15b23
|
data/CHANGELOG.md
CHANGED
data/appium_lib_core.gemspec
CHANGED
|
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
|
30
30
|
spec.add_development_dependency 'minitest', '~> 5.0'
|
|
31
31
|
spec.add_development_dependency 'minitest-reporters', '~> 1.1'
|
|
32
32
|
spec.add_development_dependency 'webmock', '~> 3.18.1'
|
|
33
|
-
spec.add_development_dependency 'rubocop', '1.
|
|
33
|
+
spec.add_development_dependency 'rubocop', '1.52.0'
|
|
34
34
|
spec.add_development_dependency 'appium_thor', '~> 1.0'
|
|
35
35
|
spec.add_development_dependency 'parallel_tests'
|
|
36
36
|
spec.add_development_dependency 'simplecov'
|
|
@@ -106,6 +106,43 @@ module Appium
|
|
|
106
106
|
# @driver.toggle_data
|
|
107
107
|
#
|
|
108
108
|
|
|
109
|
+
# @!method location
|
|
110
|
+
# Get the location of the device.
|
|
111
|
+
#
|
|
112
|
+
# @return [::Appium::Location]
|
|
113
|
+
#
|
|
114
|
+
# @example
|
|
115
|
+
#
|
|
116
|
+
# driver.location #=> ::Appium::Location.new(10, 10, 10)
|
|
117
|
+
#
|
|
118
|
+
|
|
119
|
+
# @!method location=
|
|
120
|
+
# Set the location of the device.
|
|
121
|
+
#
|
|
122
|
+
# @param [::Appium::Location] location Set the location.
|
|
123
|
+
#
|
|
124
|
+
# @example
|
|
125
|
+
#
|
|
126
|
+
# driver.location = ::Appium::Location.new(10, 10, 10)
|
|
127
|
+
#
|
|
128
|
+
|
|
129
|
+
# @!method set_location
|
|
130
|
+
# Set the location of the device.
|
|
131
|
+
#
|
|
132
|
+
# @param [String, Number] latitude Set the latitude.
|
|
133
|
+
# @param [String, Number] longitude Set the longitude.
|
|
134
|
+
# @param [String, Number] altitude Set the altitude.
|
|
135
|
+
# @param [String, Number] speed Set the speed to apply the location on Android real devices
|
|
136
|
+
# in meters/second @since Appium 1.21.0 and in knots for emulators @since Appium 1.22.0.
|
|
137
|
+
# @param [String, Number] satellites Sets the count of geo satellites being tracked in range 1..12 @since Appium 1.22.0.
|
|
138
|
+
# This number is respected on Emulators.
|
|
139
|
+
# @param [::Appium::Location]
|
|
140
|
+
#
|
|
141
|
+
# @example
|
|
142
|
+
#
|
|
143
|
+
# driver.set_location 10, 10, 0
|
|
144
|
+
#
|
|
145
|
+
|
|
109
146
|
# @!method toggle_location_services
|
|
110
147
|
# Switch the state of the location service
|
|
111
148
|
#
|
|
@@ -27,13 +27,6 @@ module Appium
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
class Default < Selenium::WebDriver::Remote::Http::Default
|
|
30
|
-
DEFAULT_HEADERS = {
|
|
31
|
-
'Accept' => CONTENT_TYPE,
|
|
32
|
-
'Content-Type' => "#{CONTENT_TYPE}; charset=UTF-8",
|
|
33
|
-
'User-Agent' =>
|
|
34
|
-
"appium/ruby_lib_core/#{VERSION} (#{::Selenium::WebDriver::Remote::Http::Common::DEFAULT_HEADERS['User-Agent']})"
|
|
35
|
-
}.freeze
|
|
36
|
-
|
|
37
30
|
attr_reader :additional_headers
|
|
38
31
|
|
|
39
32
|
# override
|
|
@@ -64,6 +57,13 @@ module Appium
|
|
|
64
57
|
@server_url = URI.parse "#{scheme}://#{host}:#{port}#{path}"
|
|
65
58
|
end
|
|
66
59
|
|
|
60
|
+
def request(verb, url, headers, payload, redirects = 0)
|
|
61
|
+
headers['User-Agent'] = "appium/ruby_lib_core/#{VERSION} (#{headers['User-Agent']})"
|
|
62
|
+
headers = headers.merge @additional_headers unless @additional_headers.empty?
|
|
63
|
+
|
|
64
|
+
super(verb, url, headers, payload, redirects)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
67
|
private
|
|
68
68
|
|
|
69
69
|
def validate_url_param(scheme, host, port, path)
|
|
@@ -73,30 +73,6 @@ module Appium
|
|
|
73
73
|
::Appium::Logger.debug(message)
|
|
74
74
|
false
|
|
75
75
|
end
|
|
76
|
-
|
|
77
|
-
public
|
|
78
|
-
|
|
79
|
-
# override to use default header
|
|
80
|
-
# https://github.com/SeleniumHQ/selenium/blob/master/rb/lib/selenium/webdriver/remote/http/common.rb#L46
|
|
81
|
-
def call(verb, url, command_hash)
|
|
82
|
-
url = server_url.merge(url) unless url.is_a?(URI)
|
|
83
|
-
headers = DEFAULT_HEADERS.dup
|
|
84
|
-
headers = headers.merge @additional_headers unless @additional_headers.empty?
|
|
85
|
-
headers['Cache-Control'] = 'no-cache' if verb == :get
|
|
86
|
-
|
|
87
|
-
if command_hash
|
|
88
|
-
payload = JSON.generate(command_hash)
|
|
89
|
-
headers['Content-Length'] = payload.bytesize.to_s if [:post, :put].include?(verb)
|
|
90
|
-
elsif verb == :post
|
|
91
|
-
payload = '{}'
|
|
92
|
-
headers['Content-Length'] = '2'
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
::Appium::Logger.info(" >>> #{url} | #{payload}")
|
|
96
|
-
::Appium::Logger.info(" > #{headers.inspect}")
|
|
97
|
-
|
|
98
|
-
request verb, url, headers, payload
|
|
99
|
-
end
|
|
100
76
|
end
|
|
101
77
|
end
|
|
102
78
|
end
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
module Appium
|
|
16
16
|
module Core
|
|
17
|
-
VERSION = '6.4.
|
|
18
|
-
DATE = '2023-
|
|
17
|
+
VERSION = '6.4.2' unless defined? ::Appium::Core::VERSION
|
|
18
|
+
DATE = '2023-06-07' unless defined? ::Appium::Core::DATE
|
|
19
19
|
end
|
|
20
20
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: appium_lib_core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 6.4.
|
|
4
|
+
version: 6.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kazuaki MATSUO
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-06-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: selenium-webdriver
|
|
@@ -120,14 +120,14 @@ dependencies:
|
|
|
120
120
|
requirements:
|
|
121
121
|
- - '='
|
|
122
122
|
- !ruby/object:Gem::Version
|
|
123
|
-
version: 1.
|
|
123
|
+
version: 1.52.0
|
|
124
124
|
type: :development
|
|
125
125
|
prerelease: false
|
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
|
127
127
|
requirements:
|
|
128
128
|
- - '='
|
|
129
129
|
- !ruby/object:Gem::Version
|
|
130
|
-
version: 1.
|
|
130
|
+
version: 1.52.0
|
|
131
131
|
- !ruby/object:Gem::Dependency
|
|
132
132
|
name: appium_thor
|
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -285,7 +285,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
285
285
|
- !ruby/object:Gem::Version
|
|
286
286
|
version: '0'
|
|
287
287
|
requirements: []
|
|
288
|
-
rubygems_version: 3.
|
|
288
|
+
rubygems_version: 3.4.10
|
|
289
289
|
signing_key:
|
|
290
290
|
specification_version: 4
|
|
291
291
|
summary: Minimal Ruby library for Appium.
|