appium_lib_core 3.5.0 → 3.6.0

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: 4b62c59d17450d1d9c3f8ebed9ca3b3aacaa1deaf3cfe9e114699a8e8bf82460
4
- data.tar.gz: d212637f293f9545044a77acf07b4ba2209bda5a76d049ed27a354fb7514ab00
3
+ metadata.gz: f19bd603ecc28d38a5ea210d846167130279bd12e0e59b8355af66877921f212
4
+ data.tar.gz: 509fa209cc410bcf9160e70905ad3b4ea439fda7f280128e210b20b1dca9b9b6
5
5
  SHA512:
6
- metadata.gz: 12a1336c1600c555c9c02030bd4a090d2a59569160ef6a14973077f336662a06d1d078cedcd1971f9688533d36b076b422bd92fed6d060880c6da7fdc200c50d
7
- data.tar.gz: 93072d58a034a15cf78d3e95b4f524eb0a91708529af9cfde5e4cc3bffa51c8333d3f0a38080cb96d6dfe8e39fb5af4355b33c8a73fe78f248b6e7ee1358ecb2
6
+ metadata.gz: d955248f477098d7127d61a9319195bf7a5ac361780bce4f475621d160f067789de1ca5280b4330285623e893f04542cc51c767fd12655579322ed6354b0dfa3
7
+ data.tar.gz: a7c26d5b16b2bf9b8166aee1b87185b27a0b8d889307c10674239f70da64ce96ce99140c75032a16a8d631e7076884ecbce522e549c098c93aa3aa0c72e57b3c
@@ -42,5 +42,7 @@ Naming/MemoizedInstanceVariableName:
42
42
  Enabled: true
43
43
  Exclude:
44
44
  - test/**/*
45
+ Naming/RescuedExceptionsVariableName:
46
+ Enabled: false
45
47
  Layout/RescueEnsureAlignment:
46
48
  Enabled: false
@@ -10,6 +10,16 @@ Read `release_notes.md` for commit level details.
10
10
 
11
11
  ### Deprecations
12
12
 
13
+ ## [3.6.0] - 2020-03-15
14
+
15
+ ### Enhancements
16
+ - Add screen record feature for Windows driver (https://github.com/appium/appium-windows-driver/pull/66)
17
+ - `#start_recording_screen`, `#stop_recording_screen`
18
+
19
+ ### Bug fixes
20
+
21
+ ### Deprecations
22
+
13
23
  ## [3.5.0] - 2020-01-11
14
24
 
15
25
  ### Enhancements
data/Rakefile CHANGED
@@ -56,6 +56,13 @@ namespace :test do
56
56
  t.libs << 'lib'
57
57
  t.test_files = FileList['test/unit/common/**/*_test.rb']
58
58
  end
59
+
60
+ desc('Run all Windows related unit tests in test directory')
61
+ Rake::TestTask.new(:windows) do |t|
62
+ t.libs << 'test'
63
+ t.libs << 'lib'
64
+ t.test_files = FileList['test/unit/windows/**/*_test.rb']
65
+ end
59
66
  end
60
67
  end
61
68
 
@@ -26,12 +26,12 @@ Gem::Specification.new do |spec|
26
26
  spec.add_runtime_dependency 'faye-websocket', '~> 0.10.0'
27
27
 
28
28
  spec.add_development_dependency 'bundler', '>= 1.14'
29
- spec.add_development_dependency 'rake', '~> 12.0'
29
+ spec.add_development_dependency 'rake', '~> 13.0'
30
30
  spec.add_development_dependency 'yard', '~> 0.9.11'
31
31
  spec.add_development_dependency 'minitest', '~> 5.0'
32
32
  spec.add_development_dependency 'minitest-reporters', '~> 1.1'
33
- spec.add_development_dependency 'webmock', '~> 3.4.0'
34
- spec.add_development_dependency 'rubocop', '0.61.0'
33
+ spec.add_development_dependency 'webmock', '~> 3.8.0'
34
+ spec.add_development_dependency 'rubocop', '0.68.1'
35
35
  spec.add_development_dependency 'appium_thor', '~> 1.0'
36
36
  spec.add_development_dependency 'pry'
37
37
  spec.add_development_dependency 'pry-byebug'
@@ -1,7 +1,7 @@
1
1
  # jobs for functional test
2
2
  parameters:
3
- vmImage: 'macOS-10.14'
4
- vmImageForIOS: 'macOS-10.14' # Not sure the reason, but macOS 10.14 instance raises no info.plist error
3
+ vmImage: 'macOS-10.15'
4
+ vmImageForIOS: 'macOS-10.15' # Not sure the reason, but macOS 10.14 instance raises no info.plist error
5
5
  xcodeForIOS: 11.3
6
6
  xcodeForTVOS: 11.3
7
7
  androidSDK: 29
@@ -27,6 +27,8 @@ module Appium
27
27
  autoload :Xcuitest, 'appium_lib_core/ios_xcuitest'
28
28
  end
29
29
 
30
+ autoload :Windows, 'appium_lib_core/windows'
31
+
30
32
  # This options affects only client side as <code>:appium_lib</code> key.<br>
31
33
  # Read {::Appium::Core::Driver} about each attribute
32
34
  class Options
@@ -475,25 +477,24 @@ module Appium
475
477
  when :android
476
478
  case automation_name
477
479
  when :espresso
478
- ::Appium::Core::Android::Espresso::Bridge.for(self)
480
+ ::Appium::Core::Android::Espresso::Bridge.for self
479
481
  when :uiautomator2
480
- ::Appium::Core::Android::Uiautomator2::Bridge.for(self)
482
+ ::Appium::Core::Android::Uiautomator2::Bridge.for self
481
483
  else # default and UiAutomator
482
- ::Appium::Core::Android::Uiautomator1::Bridge.for(self)
484
+ ::Appium::Core::Android::Uiautomator1::Bridge.for self
483
485
  end
484
486
  when :ios, :tvos
485
487
  case automation_name
486
488
  when :xcuitest
487
- ::Appium::Core::Ios::Xcuitest::Bridge.for(self)
489
+ ::Appium::Core::Ios::Xcuitest::Bridge.for self
488
490
  else # default and UIAutomation
489
- ::Appium::Core::Ios::Uiautomation::Bridge.for(self)
491
+ ::Appium::Core::Ios::Uiautomation::Bridge.for self
490
492
  end
491
493
  when :mac
492
494
  # no Mac specific extentions
493
495
  ::Appium::Logger.debug('mac')
494
496
  when :windows
495
- # no windows specific extentions
496
- ::Appium::Logger.debug('windows')
497
+ ::Appium::Core::Windows::Bridge.for self
497
498
  when :tizen
498
499
  # https://github.com/Samsung/appium-tizen-driver
499
500
  ::Appium::Logger.debug('tizen')
@@ -14,7 +14,7 @@
14
14
 
15
15
  module Appium
16
16
  module Core
17
- VERSION = '3.5.0' unless defined? ::Appium::Core::VERSION
18
- DATE = '2020-01-11' unless defined? ::Appium::Core::DATE
17
+ VERSION = '3.6.0' unless defined? ::Appium::Core::VERSION
18
+ DATE = '2020-03-15' unless defined? ::Appium::Core::DATE
19
19
  end
20
20
  end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require_relative 'windows/device'
16
+ require_relative 'windows/bridge'
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Appium
16
+ module Core
17
+ module Windows
18
+ module Bridge
19
+ def self.for(target)
20
+ target.extend Appium::Core::Windows::Device
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,98 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require_relative 'device/screen'
16
+
17
+ module Appium
18
+ module Core
19
+ module Windows
20
+ module Device
21
+ extend Forwardable
22
+
23
+ # rubocop:disable Metrics/LineLength
24
+
25
+ # @since Appium 1.18.0
26
+ # @!method start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', force_restart: nil, time_limit: nil, fps: nil, preset: nil, video_filter: nil, capture_clicks: nil, capture_cursor: nil, audio_input: nil)
27
+ #
28
+ # Record the display in background while the automated test is running.
29
+ # This method requires FFMPEG (https://www.ffmpeg.org/download.html) to be installed and present in PATH.
30
+ # The resulting video uses H264 codec and is ready to be played by media players built-in into web browsers.
31
+ #
32
+ # @param [String] remote_path The path to the remote location, where the resulting video should be uploaded.
33
+ # The following protocols are supported: http/https, ftp.
34
+ # Null or empty string value (the default setting) means the content of resulting
35
+ # file should be encoded as Base64 and passed as the endpount response value.
36
+ # An exception will be thrown if the generated media file is too big to
37
+ # fit into the available process memory.
38
+ # This option only has an effect if there is screen recording process in progreess
39
+ # and +forceRestart+ parameter is not set to +true+.
40
+ # @param [String] user The name of the user for the remote authentication.
41
+ # @param [String] pass The password for the remote authentication.
42
+ # @param [String] method The http multipart upload method name. The 'PUT' one is used by default.
43
+ # @param [Boolean] force_restart Whether to try to catch and upload/return the currently running screen recording
44
+ # (+false+, the default setting on server) or ignore the result of it
45
+ # and start a new recording immediately (+true+).
46
+ # @param [String] time_limit Recording time. 180 seconds is by default.
47
+ # @param [Number|String] fps The count of frames per second in the resulting video.
48
+ # Increasing fps value also increases the size of the resulting
49
+ # video file and the CPU usage. Defaults to 15.
50
+ # @param [String] preset A preset is a collection of options that will provide a certain encoding speed to compression ratio.
51
+ # A slower preset will provide better compression (compression is quality per filesize).
52
+ # This means that, for example, if you target a certain file size or constant bit rate, you will
53
+ # achieve better quality with a slower preset. Read https://trac.ffmpeg.org/wiki/Encode/H.264
54
+ # for more details.
55
+ # One of the supported encoding presets. Possible values are:
56
+ # - ultrafast
57
+ # - superfast
58
+ # - veryfast (default)
59
+ # - faster
60
+ # - fast
61
+ # - medium
62
+ # - slow
63
+ # - slower
64
+ # - veryslow
65
+ # @param [String] video_filter The video filter spec to apply for ffmpeg.
66
+ # See https://trac.ffmpeg.org/wiki/FilteringGuide for more details on the possible values.
67
+ # Example: Set it to +scale=ifnot(gte(iw\,1024)\,iw\,1024):-2+ in order to limit the video width
68
+ # to 1024px. The height will be adjusted automatically to match the actual screen aspect ratio.
69
+ # @param [Bool] capture_cursor Whether to capture the mouse cursor while recording the screen.
70
+ # Disabled by default.
71
+ # @param [Bool] capture_clicks Whether to capture the click gestures while recording the screen.
72
+ # Disabled by default.
73
+ # @param [String] audio_input If provided then the given audio input will be used to record the computer audio
74
+ # along with the desktop video. The list of available devices could be retrieved using
75
+ # +ffmpeg -list_devices true -f dshow -i dummy+ command.
76
+ #
77
+ # @example
78
+ #
79
+ # @driver.start_recording_screen
80
+ # @driver.start_recording_screen video_filter: 'scale=ifnot(gte(iw\,1024)\,iw\,1024):-2'
81
+ # @driver.start_recording_screen capture_cursor: true, capture_clicks: true, time_limit: '260'
82
+ #
83
+
84
+ # rubocop:enable Metrics/LineLength
85
+
86
+ ####
87
+ ## class << self
88
+ ####
89
+
90
+ class << self
91
+ def extended(_mod)
92
+ Screen.add_methods
93
+ end
94
+ end # class << self
95
+ end # module Device
96
+ end # module Windows
97
+ end # module Core
98
+ end # module Appium
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ module Appium
16
+ module Core
17
+ module Windows
18
+ module Device
19
+ module Screen
20
+ def self.add_methods
21
+ ::Appium::Core::Device.add_endpoint_method(:start_recording_screen) do
22
+ # rubocop:disable Metrics/ParameterLists
23
+ def start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT',
24
+ force_restart: nil, time_limit: nil,
25
+ fps: nil, preset: nil, video_filter: nil,
26
+ capture_clicks: nil, capture_cursor: nil, audio_input: nil)
27
+ option = ::Appium::Core::Base::Device::ScreenRecord.new(
28
+ remote_path: remote_path, user: user, pass: pass, method: method, force_restart: force_restart
29
+ ).upload_option
30
+
31
+ option[:timeLimit] = time_limit unless time_limit.nil?
32
+ option[:fps] = fps unless fps.nil?
33
+ option[:preset] = preset unless preset.nil?
34
+ option[:videoFilter] = video_filter unless video_filter.nil?
35
+ option[:captureClicks] = capture_clicks unless capture_clicks.nil?
36
+ option[:captureCursor] = capture_cursor unless capture_cursor.nil?
37
+ option[:audioInput] = audio_input unless audio_input.nil?
38
+
39
+ execute(:start_recording_screen, {}, { options: option })
40
+ end
41
+ # rubocop:enable Metrics/ParameterLists
42
+ end
43
+ end
44
+ end # module Screen
45
+ end # module Device
46
+ end # module Windows
47
+ end # module Core
48
+ end # module Appium
@@ -1,3 +1,14 @@
1
+ #### v3.6.0 2020-03-15
2
+
3
+ - [260d45e](https://github.com/appium/ruby_lib_core/commit/260d45e28a36e99e3dedbe8d41e2703c4d3fbdc8) Release 3.6.0
4
+ - [e67abd5](https://github.com/appium/ruby_lib_core/commit/e67abd53d188f0a77adb15882dd2151b1c0132e8) feat: add Windows screen record (#255)
5
+ - [164fd72](https://github.com/appium/ruby_lib_core/commit/164fd7205944a06055427000b7371311f9dc20a3) ci: Bump ci macOS version (#254)
6
+ - [7200f25](https://github.com/appium/ruby_lib_core/commit/7200f255bc5eb74a8fe8b3667db1c004a55092cf) update rubocop yml
7
+ - [2fe8c0a](https://github.com/appium/ruby_lib_core/commit/2fe8c0ae01fa3fd2653cd83415f512931adac655) Update webmock requirement from ~> 3.4.0 to ~> 3.8.0 (#253)
8
+ - [32dc172](https://github.com/appium/ruby_lib_core/commit/32dc17289f5c130b7f949bfca415e10fa4fe87d7) Update rubocop requirement from = 0.61.0 to = 0.68.1 (#251)
9
+ - [7b4402e](https://github.com/appium/ruby_lib_core/commit/7b4402e3c59d3cfee600c6375494eecb2c7c6ddf) Update rake requirement from ~> 12.0 to ~> 13.0 (#252)
10
+
11
+
1
12
  #### v3.5.0 2020-01-11
2
13
 
3
14
  - [79174fd](https://github.com/appium/ruby_lib_core/commit/79174fd6821398eacc32a897c1161140087b11e6) Release 3.5.0
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: 3.5.0
4
+ version: 3.6.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: 2020-01-10 00:00:00.000000000 Z
11
+ date: 2020-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver
@@ -64,14 +64,14 @@ dependencies:
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '12.0'
67
+ version: '13.0'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '12.0'
74
+ version: '13.0'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: yard
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -120,28 +120,28 @@ dependencies:
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: 3.4.0
123
+ version: 3.8.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: 3.4.0
130
+ version: 3.8.0
131
131
  - !ruby/object:Gem::Dependency
132
132
  name: rubocop
133
133
  requirement: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - '='
136
136
  - !ruby/object:Gem::Version
137
- version: 0.61.0
137
+ version: 0.68.1
138
138
  type: :development
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - '='
143
143
  - !ruby/object:Gem::Version
144
- version: 0.61.0
144
+ version: 0.68.1
145
145
  - !ruby/object:Gem::Dependency
146
146
  name: appium_thor
147
147
  requirement: !ruby/object:Gem::Requirement
@@ -314,6 +314,10 @@ files:
314
314
  - lib/appium_lib_core/ios_xcuitest.rb
315
315
  - lib/appium_lib_core/patch.rb
316
316
  - lib/appium_lib_core/version.rb
317
+ - lib/appium_lib_core/windows.rb
318
+ - lib/appium_lib_core/windows/bridge.rb
319
+ - lib/appium_lib_core/windows/device.rb
320
+ - lib/appium_lib_core/windows/device/screen.rb
317
321
  - release_notes.md
318
322
  - script/commands.rb
319
323
  homepage: https://github.com/appium/ruby_lib_core/