@@ -29,6 +29,58 @@ class ScreenRecord(webdriver.Remote):
29
29
def start_recording_screen (self : T , ** options : Any ) -> Union [bytes , str ]:
30
30
"""Start asynchronous screen recording process.
31
31
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
+
32
84
Keyword Args:
33
85
remotePath (str): The remotePath upload option is the path to the remote location,
34
86
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]:
54
106
forcedRestart (bool): Whether to ignore the result of previous capture and start a new recording
55
107
immediately (`True` value). By default (`False`) the endpoint will try to catch and
56
108
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).
60
109
fileFieldName (str): [multipart/form-data requests] The name of the form field
61
110
containing the binary payload. "file" by default. (Since Appium 1.18.0)
62
111
formFields (dict): [multipart/form-data requests] Additional form fields mapping. If any entry has
63
112
the same key as `fileFieldName` then it is going to be ignored. (Since Appium 1.18.0)
64
113
headers (dict): [multipart/form-data requests] Headers mapping (Since Appium 1.18.0)
65
114
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
67
116
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.
69
118
Available formats: Execute `ffmpeg -codecs` in the terminal to see the list of supported video codecs.
70
119
'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
72
121
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,
74
123
flip, rotate and do many other useful transformations on the source video stream. The format of the
75
124
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
77
126
possible values. No scale is applied by default. If videoFilters are set then the scale setting is
78
127
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.
80
129
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.
82
132
The default value is the device's native display resolution (if supported),
83
133
1280x720 if not. For best results, use a size supported by your device's
84
134
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.
87
136
The default value is 4. You can increase the bit rate to improve video quality,
88
137
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).
89
141
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.
91
143
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.
93
145
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.
95
147
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.
97
149
The list of available devices could be retrieved using
98
150
`ffmpeg -f avfoundation -list_devices true -i` command.
99
151
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
101
153
speed to compression ratio. A slower preset will provide better compression
102
154
(compression is quality per filesize). This means that, for example, if you target a certain file size
103
155
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:
132
184
Only has an effect if both `remotePath` and `user` are set.
133
185
method (str): The HTTP method name ('PUT'/'POST'). PUT method is used by default.
134
186
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)
135
192
136
193
Returns:
137
194
bytes: Base-64 encoded content of the recorded media file or an empty string
0 commit comments