Screenshot SaveAsFile Method WebDriver
Saves the screenshot to a file, overwriting the file if it already exists.

Namespace: OpenQA.Selenium
Assembly: WebDriver (in WebDriver.dll) Version: 2.35.0.0 (2.35.0.0)
Syntax

public void SaveAsFile(
	string fileName,
	ImageFormat format
)

Parameters

fileName
Type: OnlineSystem String
The full path and file name to save the screenshot to.
format
Type: OnlineSystem.Drawing.Imaging ImageFormat
A OnlineImageFormat object indicating the format to save the image to.
See Also