appium_lib_core 3.2.0 → 3.2.1

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.
@@ -30,7 +30,7 @@ module Appium
30
30
  # @param [String] close_key The name of the key which closes the keyboard.
31
31
  # @param [Symbol] strategy The symbol of the strategy which closes the keyboard.
32
32
  # XCUITest ignore this argument.
33
- # Default for iOS is `:pressKey`. Default for Android is `:tapOutside`.
33
+ # Default for iOS is +:pressKey+. Default for Android is +:tapOutside+.
34
34
  #
35
35
  # @example
36
36
  #
@@ -51,7 +51,7 @@ module Appium
51
51
  #
52
52
 
53
53
  # @since Appium 1.9.1
54
- # @!method start_recording_screen(remote_path: nil, user: nil, pass: nil, method: nil, force_restart: nil, video_type: 'mjpeg', video_fps: nil, time_limit: '180', video_quality: 'medium', video_scale: '320:240')
54
+ # @!method start_recording_screen(remote_path: nil, user: nil, pass: nil, method: nil, force_restart: nil, video_type: 'mjpeg', video_fps: nil, time_limit: '180', video_quality: 'medium', video_scale: nil, video_filters: nil, pixel_format: nil)
55
55
  #
56
56
  # Record the display of devices running iOS Simulator since Xcode 9 or real devices since iOS 11
57
57
  # (ffmpeg utility is required: 'brew install ffmpeg').
@@ -64,30 +64,39 @@ module Appium
64
64
  # An exception will be thrown if the generated media file is too big to
65
65
  # fit into the available process memory.
66
66
  # This option only has an effect if there is screen recording process in progreess
67
- # and `forceRestart` parameter is not set to `true`.
67
+ # and +forceRestart+ parameter is not set to +true+.
68
68
  # @param [String] user The name of the user for the remote authentication.
69
69
  # @param [String] pass The password for the remote authentication.
70
70
  # @param [String] method The http multipart upload method name. The 'PUT' one is used by default.
71
71
  # @param [Boolean] force_restart Whether to try to catch and upload/return the currently running screen recording
72
- # (`false`, the default setting on server) or ignore the result of it
73
- # and start a new recording immediately (`true`).
72
+ # (+false+, the default setting on server) or ignore the result of it
73
+ # and start a new recording immediately (+true+).
74
74
  # @param [String] video_type The video codec type used for encoding of the be recorded screen capture.
75
- # Execute `ffmpeg -codecs` in the terminal to see the list of supported video codecs.
75
+ # Execute +ffmpeg -codecs+ in the terminal to see the list of supported video codecs.
76
76
  # 'mjpeg' by default.
77
77
  # @param [String] time_limit Recording time. 180 seconds is by default.
78
78
  # @param [String] video_quality The video encoding quality (low, medium, high, photo - defaults to medium).
79
79
  # @param [String] video_fps The Frames Per Second rate of the recorded video. Change this value if the resulting video
80
80
  # is too slow or too fast. Defaults to 10. This can decrease the resulting file size.
81
+ # @param [String] video_filters - @since Appium 1.15.0
82
+ # The ffmpeg video filters to apply. These filters allow to scale, flip, rotate and do many
83
+ # other useful transformations on the source video stream. The format of the property
84
+ # must comply with https://ffmpeg.org/ffmpeg-filters.html
85
+ # e.g.: "rotate=90"
81
86
  # @param [String] video_scale The scaling value to apply. Read https://trac.ffmpeg.org/wiki/Scaling for possible values.
82
87
  # No scale is applied by default.
83
- # @param [String] pixel_format Output pixel format. Run `ffmpeg -pix_fmts` to list possible values.
88
+ # tips: ffmpeg cannot capture video as +libx264+ if the video dimensions is not divisible by 2.
89
+ # Then, you can set this scale as +scale=trunc(iw/2)*2:trunc(ih/2)*2+
90
+ # - https://github.com/appium/appium/issues/12856
91
+ # - https://www.reddit.com/r/linux4noobs/comments/671z6b/width_not_divisible_by_2_error_when_using_ffmpeg/
92
+ # @param [String] pixel_format Output pixel format. Run +ffmpeg -pix_fmts+ to list possible values.
84
93
  # For Quicktime compatibility, set to "yuv420p" along with videoType: "libx264".
85
94
  #
86
95
  # @example
87
96
  #
88
97
  # @driver.start_recording_screen
89
98
  # @driver.start_recording_screen video_type: 'mjpeg', time_limit: '260'
90
- # @driver.start_recording_screen video_type: 'libx264', time_limit: '260' # Can get `.mp4` video
99
+ # @driver.start_recording_screen video_type: 'libx264', time_limit: '260' # Can get '.mp4' video
91
100
  #
92
101
 
93
102
  # @since Appium 1.3.4
@@ -97,14 +106,14 @@ module Appium
97
106
  #
98
107
  # @param [Integer|String] timeout The maximum count of milliseconds to record the profiling information.
99
108
  # @param [String] profile_name The name of existing performance profile to apply.
100
- # Execute `instruments -s` to show the list of available profiles.
109
+ # Execute +instruments -s+ to show the list of available profiles.
101
110
  # Note, that not all profiles are supported on mobile devices.
102
111
  # @param [Integer|String] pid The ID of the process to measure the performance for.
103
- # Set it to `current` in order to measure the performance of
112
+ # Set it to +current+ in order to measure the performance of
104
113
  # the process, which belongs to the currently active application.
105
114
  # All processes running on the device are measured if
106
115
  # pid is unset (the default setting). Setting process ID while
107
- # device under test is Simulator might require `instruments` to be launched
116
+ # device under test is Simulator might require +instruments+ to be launched
108
117
  # with sudo privileges, which is not supported and will throw a timeout exception.
109
118
  # @return nil
110
119
  #
@@ -121,7 +130,7 @@ module Appium
121
130
  #
122
131
  # @param [String] save_file_path A path to save data as zipped .trace file
123
132
  # @param [String] profile_name The name of existing performance profile to apply.
124
- # Execute `instruments -s` to show the list of available profiles.
133
+ # Execute +instruments -s+ to show the list of available profiles.
125
134
  # Note, that not all profiles are supported on mobile devices.
126
135
  # @param [String] remote_path The path to the remote location, where the resulting zipped .trace file should be uploaded.
127
136
  # The following protocols are supported: http/https, ftp.
@@ -129,9 +138,9 @@ module Appium
129
138
  # file should be zipped, encoded as Base64 and passed as the endpount response value.
130
139
  # An exception will be thrown if the generated file is too big to
131
140
  # fit into the available process memory.
132
- # @param [String] user The name of the user for the remote authentication. Only works if `remotePath` is provided.
133
- # @param [String] pass The password for the remote authentication. Only works if `remotePath` is provided.
134
- # @param [String] method The http multipart upload method name. Only works if `remotePath` is provided.
141
+ # @param [String] user The name of the user for the remote authentication. Only works if +remotePath+ is provided.
142
+ # @param [String] pass The password for the remote authentication. Only works if +remotePath+ is provided.
143
+ # @param [String] method The http multipart upload method name. Only works if +remotePath+ is provided.
135
144
  #
136
145
  # @example
137
146
  #
@@ -144,11 +153,11 @@ module Appium
144
153
  # Get battery information.
145
154
  #
146
155
  # @return [Hash] Return battery level and battery state from the target real device. (Simulator has no battery.)
147
- # https://developer.apple.com/documentation/uikit/uidevice/ 's `batteryLevel` and `batteryState`.
156
+ # https://developer.apple.com/documentation/uikit/uidevice/ 's +batteryLevel+ and +batteryState+.
148
157
  # Battery level in range [0.0, 1.0], where 1.0 means 100% charge. -1 is returned
149
158
  # if the actual value cannot be retrieved from the system.
150
159
  # Battery state. The following symbols are possible
151
- # `:unplugged, :charging, :full`
160
+ # +:unplugged, :charging, :full+
152
161
  #
153
162
  # @example
154
163
  #
@@ -179,7 +188,7 @@ module Appium
179
188
  ::Appium::Core::Device.add_endpoint_method(:background_app) do
180
189
  def background_app(duration = 0)
181
190
  # https://github.com/appium/ruby_lib/issues/500, https://github.com/appium/appium/issues/7741
182
- # `execute :background_app, {}, seconds: { timeout: duration_milli_sec }` works over Appium 1.6.4
191
+ # 'execute :background_app, {}, seconds: { timeout: duration_milli_sec }' works over Appium 1.6.4
183
192
  duration_milli_sec = duration.nil? ? nil : duration * 1000
184
193
  execute :background_app, {}, seconds: { timeout: duration_milli_sec }
185
194
  end
@@ -23,7 +23,7 @@ module Appium
23
23
  # rubocop:disable Metrics/ParameterLists
24
24
  def start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', force_restart: nil,
25
25
  video_type: 'mjpeg', time_limit: '180', video_quality: 'medium',
26
- video_fps: nil, video_scale: nil, pixel_format: nil)
26
+ video_fps: nil, video_scale: nil, video_filters: nil, pixel_format: nil)
27
27
  option = ::Appium::Core::Base::Device::ScreenRecord.new(
28
28
  remote_path: remote_path, user: user, pass: pass, method: method, force_restart: force_restart
29
29
  ).upload_option
@@ -34,6 +34,7 @@ module Appium
34
34
 
35
35
  option[:videoFps] = video_fps unless video_fps.nil?
36
36
  option[:videoScale] = video_scale unless video_scale.nil?
37
+ option[:videoFilters] = video_filters unless video_filters.nil?
37
38
  option[:pixelFormat] = pixel_format unless pixel_format.nil?
38
39
 
39
40
  execute(:start_recording_screen, {}, { options: option })
@@ -40,7 +40,7 @@ module Appium
40
40
  #
41
41
  # e = @driver.find_element :accessibility_id, 'something'
42
42
  # e.value
43
- # e.resource_id # call `e.attribute "resource-id"`
43
+ # e.resource_id # call 'e.attribute "resource-id"'
44
44
  #
45
45
  def method_missing(method_name, *args, &block)
46
46
  ignore_list = [:to_hash]
@@ -56,6 +56,26 @@ module Appium
56
56
  # Alias for type
57
57
  alias type send_keys
58
58
 
59
+ # Set the value to element directly
60
+ #
61
+ # @example
62
+ #
63
+ # @driver.immediate_value 'hello'
64
+ #
65
+ def immediate_value(*value)
66
+ @bridge.set_immediate_value(self, *value)
67
+ end
68
+
69
+ # Replace the value to element directly
70
+ #
71
+ # @example
72
+ #
73
+ # @driver.replace_value 'hello'
74
+ #
75
+ def replace_value(*value)
76
+ @bridge.replace_value(self, *value)
77
+ end
78
+
59
79
  # For use with location_rel.
60
80
  #
61
81
  # @return [::Selenium::WebDriver::Point] the relative x, y in a struct. ex: { x: 0.50, y: 0.20 }
@@ -14,7 +14,7 @@
14
14
 
15
15
  module Appium
16
16
  module Core
17
- VERSION = '3.2.0' unless defined? ::Appium::Core::VERSION
18
- DATE = '2019-06-27' unless defined? ::Appium::Core::DATE
17
+ VERSION = '3.2.1' unless defined? ::Appium::Core::VERSION
18
+ DATE = '2019-07-19' unless defined? ::Appium::Core::DATE
19
19
  end
20
20
  end
@@ -1,3 +1,20 @@
1
+ #### v3.2.1 2019-07-19
2
+
3
+ - [e30a905](https://github.com/appium/ruby_lib_core/commit/e30a90549ac9dd6b0019370ce6abb8a08fc88e82) Release 3.2.1
4
+ - [48eaa01](https://github.com/appium/ruby_lib_core/commit/48eaa01c811da8d98ff28a3651d5bed70d310516) Fix check automationName youi (#230)
5
+ - [aa0c180](https://github.com/appium/ruby_lib_core/commit/aa0c180cd4eea29888d4307d74382a240e01f7ca) update azure module
6
+ - [67df100](https://github.com/appium/ruby_lib_core/commit/67df100c694e1a3d05abba2018d8243b94ba5f9e) Add filters for start_recording_screen, ios, tweak yardoc (#229)
7
+ - [2129d17](https://github.com/appium/ruby_lib_core/commit/2129d1780901e9a2cff777e09e0c645e2620e16d) ci: use macOS High Sierra for iOS since it fails on macOS host (#228)
8
+ - [307c25c](https://github.com/appium/ruby_lib_core/commit/307c25cc3286df943d740f6e8a64946ba54f66d9) add a cron schedule
9
+ - [362405b](https://github.com/appium/ruby_lib_core/commit/362405b857fa3f36b9dfe2c745c10cd288ec577f) ci: tweak skip test cases (#226)
10
+ - [80c2c07](https://github.com/appium/ruby_lib_core/commit/80c2c07c3a616c33a6047c87e6b911eaeabc58a0) install opencv4nodejs (#225)
11
+ - [47dfc1a](https://github.com/appium/ruby_lib_core/commit/47dfc1adc5493ef279ac098486bf8f94ec04a56e) add npm list task (#224)
12
+ - [3944039](https://github.com/appium/ruby_lib_core/commit/3944039413c38cda21be8e93d03461aec7f8d2f1) remove cat
13
+ - [2d55315](https://github.com/appium/ruby_lib_core/commit/2d55315d4f2480ac04c9957a26acb090ff2faa15) move cat
14
+ - [1555107](https://github.com/appium/ruby_lib_core/commit/15551077dc739b6d1c0b25cc8918e172c2fcaa2c) add a script to show appium dependencies on azure
15
+ - [3c0b05c](https://github.com/appium/ruby_lib_core/commit/3c0b05c2dd508273126b7c098c77f22f2c7a54c6) move element methods (#223)
16
+
17
+
1
18
  #### v3.2.0 2019-06-27
2
19
 
3
20
  - [2f6ca23](https://github.com/appium/ruby_lib_core/commit/2f6ca23847de85fb8134f09da627391b4a66a544) Release 3.2.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.2.0
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuaki MATSUO
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-26 00:00:00.000000000 Z
11
+ date: 2019-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver