Click or drag to resize

TakeScreenShotTakeScreenShotOfElement(IWebElement, String, String) Method

Framework to automate tests using Selenium WebDriver
Takes screen shot of specific element.

Namespace: Ocaramba.Helpers
Assembly: OcarambaLite (in OcarambaLite.dll) Version: 1.0.0+d8e789f8644d1a9b63485ad7914acf4f489f3ef9
Syntax
C#
public static string TakeScreenShotOfElement(
	IWebElement element,
	string folder,
	string screenshotName
)
Request Example

Parameters

element  IWebElement
Element to take screenshot.
folder  String
Folder to save screenshot.
screenshotName  String
Name of screenshot.

Return Value

String
Full path to taken screenshot.
Example
How to use it:
C#
var el = this.Driver.GetElement(this.menu);
var fullPath = TakeScreenShot.TakeScreenShotOfElement(el, Directory.GetCurrentDirectory() + BaseConfiguration.ScreenShotFolder, "MenuOutSideTheIFrame");
See Also