appium-android-driver
Version:
Android UiAutomator and Chrome support for Appium
32 lines • 1.78 kB
TypeScript
import type { AndroidDriver } from '../driver';
import type { StartScreenRecordingOpts, StopScreenRecordingOpts } from './types';
/**
* Starts screen recording on the Android device.
*
* This method uses Android's `screenrecord` command to capture the screen.
* The recording can be configured with various options such as video size,
* bit rate, time limit, and more.
*
* @param options Recording options. See {@link StartScreenRecordingOpts} for details.
* @returns Promise that resolves to the result of stopping any previous recording,
* or an empty string if no previous recording was active.
* @throws {Error} If screen recording is not supported on the device or emulator,
* or if the time limit is invalid.
*/
export declare function startRecordingScreen(this: AndroidDriver, options?: StartScreenRecordingOpts): Promise<string>;
/**
* Stops screen recording and returns the recorded video.
*
* This method stops any active screen recording session and returns the recorded
* video as a base64-encoded string or uploads it to a remote location if specified.
* If multiple recording chunks were created (for long recordings), they will be
* merged using ffmpeg if available.
*
* @param options Stop recording options. See {@link StopScreenRecordingOpts} for details.
* @returns Promise that resolves to the recorded video as a base64-encoded string
* if `remotePath` is not provided, or an empty string if the video was uploaded to a remote location.
* @throws {Error} If screen recording is not supported, no recording was active,
* or if the recording process cannot be stopped.
*/
export declare function stopRecordingScreen(this: AndroidDriver, options?: StopScreenRecordingOpts): Promise<string>;
//# sourceMappingURL=recordscreen.d.ts.map