Skip to content

Commit 1a8c736

Browse files
authored
chore: Add table for screen_record kwarg (appium#582)
* Add table for kwarg * update * Add missing doc to stop_recording * Push auto-generated changes by sphinx * delete duplicated entry [skip ci]
1 parent 1bf0553 commit 1a8c736

File tree

7 files changed

+75
-23
lines changed

7 files changed

+75
-23
lines changed

appium/webdriver/extensions/screen_record.py

Lines changed: 74 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,58 @@ class ScreenRecord(webdriver.Remote):
2929
def start_recording_screen(self: T, **options: Any) -> Union[bytes, str]:
3030
"""Start asynchronous screen recording process.
3131
32+
+--------------+-----+---------+-----+-------+
33+
| Keyword Args | iOS | Android | Win | macOS |
34+
+==============+=====+=========+=====+=======+
35+
| remotePath | O | O | O | O |
36+
+--------------+-----+---------+-----+-------+
37+
| user | O | O | O | O |
38+
+--------------+-----+---------+-----+-------+
39+
| password | O | O | O | O |
40+
+--------------+-----+---------+-----+-------+
41+
| method | O | O | O | O |
42+
+--------------+-----+---------+-----+-------+
43+
| timeLimit | O | O | O | O |
44+
+--------------+-----+---------+-----+-------+
45+
| forceRestart | O | O | O | O |
46+
+--------------+-----+---------+-----+-------+
47+
| fileFieldName| O | O | O | O |
48+
+--------------+-----+---------+-----+-------+
49+
| formFields | O | O | O | O |
50+
+--------------+-----+---------+-----+-------+
51+
| headers | O | O | O | O |
52+
+--------------+-----+---------+-----+-------+
53+
| videoQuality | O | | | |
54+
+--------------+-----+---------+-----+-------+
55+
| videoType | O | | | |
56+
+--------------+-----+---------+-----+-------+
57+
| videoFps | O | | | |
58+
+--------------+-----+---------+-----+-------+
59+
| videoFilter | O | | O | O |
60+
+--------------+-----+---------+-----+-------+
61+
| videoScale | O | | | |
62+
+--------------+-----+---------+-----+-------+
63+
| pixelFormat | O | | | |
64+
+--------------+-----+---------+-----+-------+
65+
| videoSize | | O | | |
66+
+--------------+-----+---------+-----+-------+
67+
| bitRate | | O | | |
68+
+--------------+-----+---------+-----+-------+
69+
| bugReport | | O | | |
70+
+--------------+-----+---------+-----+-------+
71+
| fps | | | O | O |
72+
+--------------+-----+---------+-----+-------+
73+
| captureCursor| | | O | O |
74+
+--------------+-----+---------+-----+-------+
75+
| captureClicks| | | O | O |
76+
+--------------+-----+---------+-----+-------+
77+
| deviceId | | | | O |
78+
+--------------+-----+---------+-----+-------+
79+
| preset | | | O | O |
80+
+--------------+-----+---------+-----+-------+
81+
| audioInput | | | O | |
82+
+--------------+-----+---------+-----+-------+
83+
3284
Keyword Args:
3385
remotePath (str): The remotePath upload option is the path to the remote location,
3486
where the resulting video from the previous screen recording should be uploaded.
@@ -54,50 +106,50 @@ def start_recording_screen(self: T, **options: Any) -> Union[bytes, str]:
54106
forcedRestart (bool): Whether to ignore the result of previous capture and start a new recording
55107
immediately (`True` value). By default (`False`) the endpoint will try to catch and
56108
return the result of the previous capture if it's still available.
57-
bugReport (str): Makes the recorder to display an additional information on the video overlay,
58-
such as a timestamp, that is helpful in videos captured to illustrate bugs.
59-
This option is only supported since API level 27 (Android P).
60109
fileFieldName (str): [multipart/form-data requests] The name of the form field
61110
containing the binary payload. "file" by default. (Since Appium 1.18.0)
62111
formFields (dict): [multipart/form-data requests] Additional form fields mapping. If any entry has
63112
the same key as `fileFieldName` then it is going to be ignored. (Since Appium 1.18.0)
64113
headers (dict): [multipart/form-data requests] Headers mapping (Since Appium 1.18.0)
65114
66-
videoQuality (str): [iOS only] The video encoding quality: 'low', 'medium', 'high', 'photo'. Defaults
115+
videoQuality (str): [iOS] The video encoding quality: 'low', 'medium', 'high', 'photo'. Defaults
67116
to 'medium'.
68-
videoType (str): [iOS only] The format of the screen capture to be recorded.
117+
videoType (str): [iOS] The format of the screen capture to be recorded.
69118
Available formats: Execute `ffmpeg -codecs` in the terminal to see the list of supported video codecs.
70119
'mjpeg' by default. (Since Appium 1.10.0)
71-
videoFps (int): [iOS only] The Frames Per Second rate of the recorded video. Change this value if the
120+
videoFps (int): [iOS] The Frames Per Second rate of the recorded video. Change this value if the
72121
resulting video is too slow or too fast. Defaults to 10. This can decrease the resulting file size.
73-
videoFilters (str): [iOS, macOS only] The FFMPEG video filters to apply. These filters allow to scale,
122+
videoFilters (str): [iOS, Win, macOS] The FFMPEG video filters to apply. These filters allow to scale,
74123
flip, rotate and do many other useful transformations on the source video stream. The format of the
75124
property must comply with https://ffmpeg.org/ffmpeg-filters.html. (Since Appium 1.15)
76-
videoScale (str): [iOS only] The scaling value to apply. Read https://trac.ffmpeg.org/wiki/Scaling for
125+
videoScale (str): [iOS] The scaling value to apply. Read https://trac.ffmpeg.org/wiki/Scaling for
77126
possible values. No scale is applied by default. If videoFilters are set then the scale setting is
78127
effectively ignored. (Since Appium 1.10.0)
79-
pixelFormat (str): [iOS only] Output pixel format. Run `ffmpeg -pix_fmts` to list possible values.
128+
pixelFormat (str): [iOS] Output pixel format. Run `ffmpeg -pix_fmts` to list possible values.
80129
For Quicktime compatibility, set to "yuv420p" along with videoType: "libx264". (Since Appium 1.12.0)
81-
videoSize (str): [Android only] The video size of the generated media file. The format is WIDTHxHEIGHT.
130+
131+
videoSize (str): [Android] The video size of the generated media file. The format is WIDTHxHEIGHT.
82132
The default value is the device's native display resolution (if supported),
83133
1280x720 if not. For best results, use a size supported by your device's
84134
Advanced Video Coding (AVC) encoder.
85-
86-
bitRate (int): [Android only] The video bit rate for the video, in megabits per second.
135+
bitRate (int): [Android] The video bit rate for the video, in megabits per second.
87136
The default value is 4. You can increase the bit rate to improve video quality,
88137
but doing so results in larger movie files.
138+
bugReport (str): [Android] Makes the recorder to display an additional information on the video overlay,
139+
such as a timestamp, that is helpful in videos captured to illustrate bugs.
140+
This option is only supported since API level 27 (Android P).
89141
90-
fps (int): [macOS only] The count of frames per second in the resulting video.
142+
fps (int): [Win, macOS] The count of frames per second in the resulting video.
91143
Increasing fps value also increases the size of the resulting video file and the CPU usage.
92-
captureCursor (bool): [macOS only] Whether to capture the mouse cursor while recording the screen.
144+
captureCursor (bool): [Win, macOS] Whether to capture the mouse cursor while recording the screen.
93145
Disabled by default.
94-
captureClick (bool): [macOS only] Whether to capture the click gestures while recording the screen.
146+
captureClick (bool): [Win, macOS] Whether to capture the click gestures while recording the screen.
95147
Disabled by default.
96-
deviceId (int): [macOS only] Screen device index to use for the recording.
148+
deviceId (int): [macOS] Screen device index to use for the recording.
97149
The list of available devices could be retrieved using
98150
`ffmpeg -f avfoundation -list_devices true -i` command.
99151
This option is mandatory and must be always provided.
100-
preset (str): [macOS only] A preset is a collection of options that will provide a certain encoding
152+
preset (str): [Win, macOS] A preset is a collection of options that will provide a certain encoding
101153
speed to compression ratio. A slower preset will provide better compression
102154
(compression is quality per filesize). This means that, for example, if you target a certain file size
103155
or constant bit rate, you will achieve better quality with a slower preset.
@@ -132,6 +184,11 @@ def stop_recording_screen(self: T, **options: Any) -> bytes:
132184
Only has an effect if both `remotePath` and `user` are set.
133185
method (str): The HTTP method name ('PUT'/'POST'). PUT method is used by default.
134186
Only has an effect if `remotePath` is set.
187+
fileFieldName (str): [multipart/form-data requests] The name of the form field
188+
containing the binary payload. "file" by default. (Since Appium 1.18.0)
189+
formFields (dict): [multipart/form-data requests] Additional form fields mapping. If any entry has
190+
the same key as `fileFieldName` then it is going to be ignored. (Since Appium 1.18.0)
191+
headers (dict): [multipart/form-data requests] Headers mapping (Since Appium 1.18.0)
135192
136193
Returns:
137194
bytes: Base-64 encoded content of the recorded media file or an empty string

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.. Appium python client documentation master file, created by
2-
sphinx-quickstart on Sun May 10 14:33:16 2020.
2+
sphinx-quickstart on Wed Feb 10 19:35:06 2021.
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55

docs/webdriver.common.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ webdriver.common.touch\_action module
2828
:undoc-members:
2929
:show-inheritance:
3030

31-
3231
Module contents
3332
---------------
3433

docs/webdriver.extensions.android.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ webdriver.extensions.android.system\_bars module
8484
:undoc-members:
8585
:show-inheritance:
8686

87-
8887
Module contents
8988
---------------
9089

docs/webdriver.extensions.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ webdriver.extensions.settings module
149149
:undoc-members:
150150
:show-inheritance:
151151

152-
153152
Module contents
154153
---------------
155154

docs/webdriver.extensions.search_context.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ webdriver.extensions.search\_context.windows module
5252
:undoc-members:
5353
:show-inheritance:
5454

55-
5655
Module contents
5756
---------------
5857

docs/webdriver.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ webdriver.webelement module
9393
:undoc-members:
9494
:show-inheritance:
9595

96-
9796
Module contents
9897
---------------
9998

0 commit comments

Comments
 (0)