Module: Appium::Core::Windows::Device

Extended by:
Defined in:

Defined Under Namespace

Modules: Screen

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.extended(_mod) ⇒ Object

# File 'lib/appium_lib_core/windows/device.rb', line 79

def extended(_mod)

Instance Method Details

#start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', force_restart: nil, time_limit: nil, fps: nil, preset: nil, video_filter: nil, capture_clicks: nil, capture_cursor: nil, audio_input: nil) ⇒ String

Record the display in background while the automated test is running. This method requires FFMPEG ( to be installed and present in PATH. The resulting video uses H264 codec and is ready to be played by media players built-in into web browsers.


@driver.start_recording_screen video_filter: 'scale=ifnot(gte(iw\,1024)\,iw\,1024):-2'
@driver.start_recording_screen capture_cursor: true, capture_clicks: true, time_limit: '260'


  • force_restart (Boolean) (defaults to: nil)

    Whether to stop existing recording process forcefully and start a new recording process.

  • time_limit (String) (defaults to: nil)

    Recording time. 600 seconds is by default.

  • fps (Number|String) (defaults to: nil)

    The count of frames per second in the resulting video. Increasing fps value also increases the size of the resulting video file and the CPU usage. Defaults to 15.

  • preset (String) (defaults to: nil)

    A preset is a collection of options that will provide a certain encoding speed to compression ratio. A slower preset will provide better compression (compression is quality per filesize). This means that, for example, if you target a certain file size or constant bit rate, you will achieve better quality with a slower preset. Read for more details. One of the supported encoding presets. Possible values are:

    - ultrafast
    - superfast
    - veryfast (default)
    - faster
    - fast
    - medium
    - slow
    - slower
    - veryslow
  • video_filter (String) (defaults to: nil)

    The video filter spec to apply for ffmpeg. See for more details on the possible values. Example: Set it to scale=ifnot(gte(iw,1024),iw,1024):-2 in order to limit the video width to 1024px. The height will be adjusted automatically to match the actual screen aspect ratio.

  • capture_cursor (Bool) (defaults to: nil)

    Whether to capture the mouse cursor while recording the screen. Disabled by default.

  • capture_clicks (Bool) (defaults to: nil)

    Whether to capture the click gestures while recording the screen. Disabled by default.

  • audio_input (String) (defaults to: nil)

    If provided then the given audio input will be used to record the computer audio along with the desktop video. The list of available devices could be retrieved using ffmpeg -list_devices true -f dshow -i dummy command.


  • (String)

    Base64 encoded content of the recorded media file


  • Appium 1.18.0

# File 'lib/appium_lib_core/windows/device.rb', line 25