Click or drag to resize
Ranorex

ReportScreenshot Method (ReportLevel, String, String, Element, Boolean, IReportMetadata)

Logs a message containing a screenshot of a specified element.

Namespace:  Ranorex
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public static void Screenshot(
	ReportLevel level,
	string category,
	string message,
	Element target,
	bool highlightWithinSurroundingArea,
	params IReportMetadata[] metaData
)

Parameters

level
Type: RanorexReportLevel
The reporting level of the message.
category
Type: SystemString
The category name.
message
Type: SystemString
An optional message for the screenshot.
target
Type: Ranorex.CoreElement
The element to make the screenshot from.
highlightWithinSurroundingArea
Type: SystemBoolean
If set to true the screenshot will not only contain the element, but also its surrounding area and will highlight the element within it.
metaData
Type: Ranorex.CoreIReportMetadata
Advanced reference information for use in the report. Used by Ranorex internally.
Remarks
Screenshots will not show up in the console logger.
See Also