Skip to main content

screenshot

Function screenshot 

Source
pub async fn screenshot(
    host: &Host,
    device_id: &str,
    output: &Path,
) -> Result<()>
Expand description

Capture a screenshot from an Android device.

Uses adb exec-out screencap -p to capture the screen and writes the PNG data directly to the output file.

ยงErrors

Returns an error if the screenshot command fails, the device is not available, or the output file cannot be written.