appium_lib_core 2.0.6 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/lib/appium_lib_core/driver.rb +40 -12
- data/lib/appium_lib_core/ios/xcuitest/device.rb +2 -0
- data/lib/appium_lib_core/ios/xcuitest/device/screen.rb +2 -1
- data/lib/appium_lib_core/version.rb +2 -2
- data/release_notes.md +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 839d870bf455e8e1f835888ab0c780ed8a5acac7
|
4
|
+
data.tar.gz: b5efadecea9570d191885893167d7a7c0cf4442e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56815ca165aebf552d3172b11cc669be750bf57ca391a33d78f2b4ca8676e1be73b025981b0c2a6c530a9be27d43d8294f988f49ed1ed592ecf7630537105a7d
|
7
|
+
data.tar.gz: 8ce5dcdcbed3f802bac42274335d0b85d632df8efb9f2abad1dab7a779110c458e8e8ff3fcbacfa1581cd822a685d58c29fc2725ec111b224aa3e3256b019964
|
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,22 @@ Read `release_notes.md` for commit level details.
|
|
9
9
|
|
10
10
|
### Deprecations
|
11
11
|
|
12
|
+
## [2.1.0] - 2018-11-14
|
13
|
+
### Enhancements
|
14
|
+
- Support below style _1_, has _url_ parameter, in addition to style _2_
|
15
|
+
```
|
16
|
+
# 1
|
17
|
+
Appium::Core.for url: "http://127.0.0.1:8080/wd/hub", caps: {...}, appium_lib: {...}
|
18
|
+
|
19
|
+
# 2
|
20
|
+
Appium::Core.for caps: {...}, appium_lib: {...}
|
21
|
+
```
|
22
|
+
- Add `videoFps` param for screen recording in iOS(XCUITest) to sync with Appium 1.9.2
|
23
|
+
|
24
|
+
### Bug fixes
|
25
|
+
|
26
|
+
### Deprecations
|
27
|
+
|
12
28
|
## [2.0.6] - 2018-11-08
|
13
29
|
### Enhancements
|
14
30
|
- Allow selenium update following Pi versioning like 3.141.0
|
@@ -51,6 +51,7 @@ module Appium
|
|
51
51
|
|
52
52
|
# Appium's server port. 4723 is by default.
|
53
53
|
# Provide Appium::Drive like { appium_lib: { port: 8080 } }
|
54
|
+
# `:custom_url` is prior than `:port` if `:custom_url` is set.
|
54
55
|
# @return [Integer]
|
55
56
|
attr_reader :port
|
56
57
|
DEFAULT_APPIUM_PORT = 4723
|
@@ -81,6 +82,12 @@ module Appium
|
|
81
82
|
#
|
82
83
|
# @example
|
83
84
|
#
|
85
|
+
# # format 1
|
86
|
+
# @core = Appium::Core.for caps: {...}, appium_lib: {...}
|
87
|
+
# # format 2
|
88
|
+
# @core = Appium::Core.for url: "http://127.0.0.1:8080/wd/hub", caps: {...}, appium_lib: {...}
|
89
|
+
#
|
90
|
+
#
|
84
91
|
# require 'rubygems'
|
85
92
|
# require 'appium_lib_core'
|
86
93
|
#
|
@@ -94,7 +101,6 @@ module Appium
|
|
94
101
|
# app: '/path/to/MyiOS.app'
|
95
102
|
# },
|
96
103
|
# appium_lib: {
|
97
|
-
# server_url: "http://custom-host:8080/wd/hub.com",
|
98
104
|
# export_session: false,
|
99
105
|
# port: 8080,
|
100
106
|
# wait: 0,
|
@@ -104,7 +110,7 @@ module Appium
|
|
104
110
|
# }
|
105
111
|
# }
|
106
112
|
# @core = Appium::Core.for(opts) # create a core driver with `opts` and extend methods into `self`
|
107
|
-
# @core.start_driver
|
113
|
+
# @core.start_driver # Connect to `http://127.0.0.1:8080/wd/hub` because of `port: 8080`
|
108
114
|
#
|
109
115
|
# # Start iOS driver with .zip file over HTTP
|
110
116
|
# opts = {
|
@@ -116,9 +122,8 @@ module Appium
|
|
116
122
|
# app: 'http://example.com/path/to/MyiOS.app.zip'
|
117
123
|
# },
|
118
124
|
# appium_lib: {
|
119
|
-
# server_url:
|
125
|
+
# server_url: 'http://custom-host:8080/wd/hub.com',
|
120
126
|
# export_session: false,
|
121
|
-
# port: 8080,
|
122
127
|
# wait: 0,
|
123
128
|
# wait_timeout: 20,
|
124
129
|
# wait_interval: 0.3,
|
@@ -126,7 +131,28 @@ module Appium
|
|
126
131
|
# }
|
127
132
|
# }
|
128
133
|
# @core = Appium::Core.for(opts)
|
129
|
-
# @core.start_driver
|
134
|
+
# @core.start_driver # Connect to `http://custom-host:8080/wd/hub.com`
|
135
|
+
#
|
136
|
+
# # Start iOS driver as another format. `url` is available like below
|
137
|
+
# opts = {
|
138
|
+
# url: "http://custom-host:8080/wd/hub.com",
|
139
|
+
# caps: {
|
140
|
+
# platformName: :ios,
|
141
|
+
# platformVersion: '11.0',
|
142
|
+
# deviceName: 'iPhone Simulator',
|
143
|
+
# automationName: 'XCUITest',
|
144
|
+
# app: '/path/to/MyiOS.app'
|
145
|
+
# },
|
146
|
+
# appium_lib: {
|
147
|
+
# export_session: false,
|
148
|
+
# wait: 0,
|
149
|
+
# wait_timeout: 20,
|
150
|
+
# wait_interval: 0.3,
|
151
|
+
# listener: nil,
|
152
|
+
# }
|
153
|
+
# }
|
154
|
+
# @core = Appium::Core.for(opts) # create a core driver with `opts` and extend methods into `self`
|
155
|
+
# @core.start_driver # start driver with `url`. Connect to `http://custom-host:8080/wd/hub.com`
|
130
156
|
#
|
131
157
|
def self.for(opts = {})
|
132
158
|
new(opts)
|
@@ -149,6 +175,7 @@ module Appium
|
|
149
175
|
opts = Appium.symbolize_keys opts
|
150
176
|
validate_keys(opts)
|
151
177
|
|
178
|
+
@custom_url = opts.delete :url
|
152
179
|
@caps = get_caps(opts)
|
153
180
|
|
154
181
|
set_appium_lib_specific_values(get_appium_lib_opts(opts))
|
@@ -200,7 +227,7 @@ module Appium
|
|
200
227
|
|
201
228
|
def start_driver(server_url: nil,
|
202
229
|
http_client_ops: { http_client: nil, open_timeout: 999_999, read_timeout: 999_999 })
|
203
|
-
|
230
|
+
@custom_url ||= server_url || "http://127.0.0.1:#{@port}/wd/hub"
|
204
231
|
|
205
232
|
create_http_client http_client: http_client_ops.delete(:http_client),
|
206
233
|
open_timeout: http_client_ops.delete(:open_timeout),
|
@@ -210,13 +237,13 @@ module Appium
|
|
210
237
|
# included https://github.com/SeleniumHQ/selenium/blob/43f8b3f66e7e01124eff6a5805269ee441f65707/rb/lib/selenium/webdriver/remote/driver.rb#L29
|
211
238
|
@driver = ::Appium::Core::Base::Driver.new(http_client: @http_client,
|
212
239
|
desired_capabilities: @caps,
|
213
|
-
url:
|
240
|
+
url: @custom_url,
|
214
241
|
listener: @listener)
|
215
242
|
|
216
243
|
# export session
|
217
244
|
write_session_id(@driver.session_id, @export_session_path) if @export_session
|
218
245
|
rescue Errno::ECONNREFUSED
|
219
|
-
raise "ERROR: Unable to connect to Appium. Is the server running on #{
|
246
|
+
raise "ERROR: Unable to connect to Appium. Is the server running on #{@custom_url}?"
|
220
247
|
end
|
221
248
|
|
222
249
|
# If "automationName" is set only server side, this method set "automationName" attribute into @automation_name.
|
@@ -273,8 +300,9 @@ module Appium
|
|
273
300
|
# @core.appium_server_version
|
274
301
|
# {
|
275
302
|
# "build" => {
|
276
|
-
# "version" => "
|
277
|
-
# "
|
303
|
+
# "version" => "1.9.2",
|
304
|
+
# "git-sha" => "fd7c7fd19d3896719616cd970229d73e63b5271a",
|
305
|
+
# "built" => "2018-11-08 12:24:02 +0900"
|
278
306
|
# }
|
279
307
|
# }
|
280
308
|
#
|
@@ -404,14 +432,14 @@ module Appium
|
|
404
432
|
@caps[:app] = if File.exist? app_path
|
405
433
|
app_path
|
406
434
|
else
|
407
|
-
::Appium::Logger.
|
435
|
+
::Appium::Logger.warn("Use #{@caps[:app]} directly since #{app_path} does not exist.")
|
408
436
|
@caps[:app]
|
409
437
|
end
|
410
438
|
end
|
411
439
|
|
412
440
|
# @private
|
413
441
|
def set_appium_lib_specific_values(appium_lib_opts)
|
414
|
-
@custom_url
|
442
|
+
@custom_url ||= appium_lib_opts.fetch :server_url, nil
|
415
443
|
@default_wait = appium_lib_opts.fetch :wait, 20
|
416
444
|
|
417
445
|
# bump current session id into a particular file
|
@@ -57,6 +57,8 @@ module Appium
|
|
57
57
|
# @param [String] time_limit: Recording time. 180 seconds is by default.
|
58
58
|
# @param [String] video_quality: The video encoding quality (low, medium, high, photo - defaults to medium).
|
59
59
|
# Only works for real devices.
|
60
|
+
# @param [String] video_fps: The Frames Per Second rate of the recorded video. Change this value if the resulting video
|
61
|
+
# is too slow or too fast. Defaults to 10.
|
60
62
|
#
|
61
63
|
# @example
|
62
64
|
#
|
@@ -8,7 +8,7 @@ module Appium
|
|
8
8
|
::Appium::Core::Device.add_endpoint_method(:start_recording_screen) do
|
9
9
|
# rubocop:disable Metrics/ParameterLists
|
10
10
|
def start_recording_screen(remote_path: nil, user: nil, pass: nil, method: nil, force_restart: nil,
|
11
|
-
video_type: 'mp4', time_limit: '180', video_quality: 'medium')
|
11
|
+
video_type: 'mp4', time_limit: '180', video_quality: 'medium', video_fps: nil)
|
12
12
|
option = ::Appium::Core::Base::Device::ScreenRecord.new(
|
13
13
|
remote_path: remote_path, user: user, pass: pass, method: method, force_restart: force_restart
|
14
14
|
).upload_option
|
@@ -16,6 +16,7 @@ module Appium
|
|
16
16
|
option[:videoType] = video_type
|
17
17
|
option[:timeLimit] = time_limit
|
18
18
|
option[:videoQuality] = video_quality
|
19
|
+
option[:videoFps] = video_fps unless video_fps.nil?
|
19
20
|
|
20
21
|
execute(:start_recording_screen, {}, { options: option })
|
21
22
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Appium
|
2
2
|
module Core
|
3
|
-
VERSION = '2.0
|
4
|
-
DATE = '2018-11-
|
3
|
+
VERSION = '2.1.0'.freeze unless defined? ::Appium::Core::VERSION
|
4
|
+
DATE = '2018-11-14'.freeze unless defined? ::Appium::Core::DATE
|
5
5
|
end
|
6
6
|
end
|
data/release_notes.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
#### v2.1.0 2018-11-14
|
2
|
+
|
3
|
+
- [6dafbd6](https://github.com/appium/ruby_lib_core/commit/6dafbd6cbc270f94a5e8b2ea5a779b644fdc3cdf) Release 2.1.0
|
4
|
+
- [995cd5b](https://github.com/appium/ruby_lib_core/commit/995cd5b2b27ef9a52a877835c6cfa5cf79e24183) sync video_fps (#162)
|
5
|
+
- [c1b9ee8](https://github.com/appium/ruby_lib_core/commit/c1b9ee8eb413a6bc2f4c8d37a1225eaedea210b1) add reduceMotion
|
6
|
+
- [8f26efd](https://github.com/appium/ruby_lib_core/commit/8f26efd29656aa4d79c9e2d2c5d1846f7339f67c) make no app warning
|
7
|
+
- [a549a8a](https://github.com/appium/ruby_lib_core/commit/a549a8ab1977e86bc29533a829cd9bc69067d24e) Add url param like selenium-webdriver (#161)
|
8
|
+
- [6603750](https://github.com/appium/ruby_lib_core/commit/66037503fc83155b40af56221f0f0762f7803d58) add mobile permission commands (#160)
|
9
|
+
|
10
|
+
|
1
11
|
#### v2.0.6 2018-11-08
|
2
12
|
|
3
13
|
- [b7ede91](https://github.com/appium/ruby_lib_core/commit/b7ede919a26b4d83b88955cb7d595a8538f5c146) Release 2.0.6
|
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: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuaki MATSUO
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|