C# Class BitrixAQA.Selenium.General.ScreenCapture

Provides functions to capture the entire screen, or a particular window, and save it to a file.
Show file Open project: BitrixQA/BitrixAQA Class Usage Examples

Public Methods

Method Description
CaptureScreen ( ) : Image

Creates an Image object containing a screen shot of the entire desktop

CaptureScreenToFile ( string filename, ImageFormat format ) : void

Captures a screen shot of the entire desktop, and saves it to a file

CaptureWindow ( IntPtr handle ) : Image

Creates an Image object containing a screen shot of a specific window

CaptureWindowToFile ( IntPtr handle, string filename, ImageFormat format ) : void

Captures a screen shot of a specific window, and saves it to a file

Printscreen ( bool returnStringPath = false ) : string

Метод делает принтскрин и записывает файл в папку \screenshots. Возвращает имя файла

Method Details

CaptureScreen() public method

Creates an Image object containing a screen shot of the entire desktop
public CaptureScreen ( ) : Image
return Image

CaptureScreenToFile() public method

Captures a screen shot of the entire desktop, and saves it to a file
public CaptureScreenToFile ( string filename, ImageFormat format ) : void
filename string
format System.Drawing.Imaging.ImageFormat
return void

CaptureWindow() public method

Creates an Image object containing a screen shot of a specific window
public CaptureWindow ( IntPtr handle ) : Image
handle System.IntPtr The handle to the window. (In windows forms, this is obtained by the Handle property)
return Image

CaptureWindowToFile() public method

Captures a screen shot of a specific window, and saves it to a file
public CaptureWindowToFile ( IntPtr handle, string filename, ImageFormat format ) : void
handle System.IntPtr
filename string
format System.Drawing.Imaging.ImageFormat
return void

Printscreen() public static method

Метод делает принтскрин и записывает файл в папку \screenshots. Возвращает имя файла
public static Printscreen ( bool returnStringPath = false ) : string
returnStringPath bool true - вернуть имя файла в виде простой строки
return string