Appium-Start Recording Screen(开始录制屏幕)


Start recording screen

Example Usage
Javadriver.startRecordingScreen();
driver.startRecordingScreen(new BaseStartScreenRecordingOptions(…));
Pythonself.driver.start_recording_screen()
Javascript// webdriver.io example
driver.startRecordingScreen();
// wd example
await driver.startRecordingScreen();
Ruby# ruby_lib example
start_recording_screen
start_recording_screen video_size: '1280x720', time_limit: '180', bit_rate: '5000000' # Android
start_recording_screen video_type:'h264', time_limit: '260' # iOS
# ruby_lib_core example
@driver.get_performance_data_types
C#driver.StartRecordingScreen(
AndroidStartScreenRecordingOptions.GetAndroidStartScreenRecordingOptions()
.WithTimeLimit(TimeSpan.FromSeconds(10))
.WithBitRate(500000)
.WithVideoSize("720x1280"));
PHP// TODO PHP sample
Support
Appium Server
PlatformDriverPlatform VersionsAppium VersionDriver Version
iOSXCUITest9.3+1.6.0+All
UIAutomationNoneNoneNone
AndroidEspresso?+1.9.0+All
UiAutomator2?+1.6.0+All
UiAutomator4.3+AllAll
MacMacNoneNoneNone
WindowsWindowsNoneNoneNone
Appium Clients
LanguageSupportDocumentation
JavaAllappium.github.io
PythonNoneappium.github.io
Javascript (WebdriverIO)All
Javascript (WD)Allgithub.com
RubyAllwww.rubydoc.info
PHPNonegithub.com
C#Nonegithub.com
HTTP API Specifications
Endpoint

POST /session/:session_id/appium/start_recording_screen

URL Parameters
namedescription
session_idID of the session to route the command to
JSON Parameters
nametypedescription
optionsobjectThe following parameters of the action
options.remotePathstringThe path to the remote location, where the resulting video should be uploaded. The following protocols are supported http/https, ftp. Null or empty string value (the default setting) means the content of resulting file should be encoded as Base64 and passed as the endpoint response value. An exception will be thrown if the generated media file is too big to fit into the available process memory. This option only has an effect if there is screen recording process in progress and forceRestart parameter is not set to true.
options.usernamestringThe name of the user for the remote authentication.
options.passwordstringThe password for the remote authentication.
options.methodstringThe http multipart upload method name. The ‘PUT’ one is used by default.
options.forceRestartbooleanWhether to try to catch and upload/return the currently running screen recording (false, the default setting on server) or ignore the result of it and start a new recording immediately (true).
options.timeLimitstringRecording time. 180 seconds is by default.
options.videoTypestring(iOS Only) The format of the screen capture to be recorded. Available formats are the output of ffmpeg -codecs such as libx264 and mpeg4. Defaults to mjpeg.
options.videoQualitystring(iOS Only) The video encoding quality (low, medium, high, photo - defaults to medium).
options.videoFpsstring(iOS Only) The Frames Per Second rate of the recorded video. Change this value if the resulting video is too slow or too fast. Defaults to 10. This can decrease the resulting file size.
options.videoScalestring(iOS Only) The scaling value to apply. Read https://trac.ffmpeg.org/wiki/Scaling for possible values. Example value of 720p scaling is ‘1280:720’. This can decrease/increase the resulting file size. No scale is applied by default.
options.bitRatestring(Android Only) The video bit rate for the video, in megabits per second. 4 Mbp/s(4000000) is by default for Android API level below 27. 20 Mb/s(20000000) for API level 27 and above.
options.videoSizestring(Android Only) The format is widthxheight. The default value is the device’s native display resolution (if supported), 1280x720 if not. For best results, use a size supported by your device’s Advanced Video Coding (AVC) encoder. For example, “1280x720”
options.bugReportstring(Android Only) Set it to true in order to display additional information on the video overlay, such as a timestamp, that is helpful in videos captured to illustrate bugs. This option is only supported since API level 27 (Android O).
Response

null

  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Aniona

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值