saveRecordingScreen
Save a video started by a driver mobile: screen-recording execute method to a file.
info
This command is only supported for mobile sessions running on Appium.
Start recording with the driver-specific execute method first, for example
mobile: startXCTestScreenRecording (iOS) or mobile: startMediaProjectionRecording (Android).
Usage
await browser.saveRecordingScreen(filepath)
Parameters
| Name | Type | Details |
|---|---|---|
filepath | String | full or relative to the execution directory path to the generated video |
Example
saveRecordingScreen.js
it('should save a video', async () => {
await browser.execute('mobile: startMediaProjectionRecording', {})
await $('~BUTTON').click()
await browser.saveRecordingScreen('./some/path/video.mp4')
})
Returns
- <Buffer>
return: video buffer