saveRecordingScreen
Save a video started by startRecordingScreen
command to file.
info
This command is only supported for mobile sessions running on Appium.
Usage
browser.saveRecordingScreen(filepath)
Parameters
Name | Type | Details |
---|---|---|
filepath | String | full or relative to the execution directory path to the generated video |
Example
- Asynchronous Mode
- Synchronous Mode
saveRecordingScreen.js
it('should save a video', async () => {
await browser.startRecordingScreen();
await $('~BUTTON').click();
await browser.saveRecordingScreen('./some/path/video.mp4');
});
saveRecordingScreen.js
it('should save a video', () => {
browser.startRecordingScreen();
$('~BUTTON').click();
browser.saveRecordingScreen('./some/path/video.mp4');
});
caution
Synchronous Mode will depcrecated with Node.js v16. With an update to the underlying Chromium version it became technically impossible to provide the same synchronous behavior. We recommend to start transition to asynchronous command execution. For more information, see our RFC.