 | TakeScreenShotTakeScreenShotOfElement Method |
Framework to automate tests using Selenium WebDriver
Takes screen shot of specific element .
Namespace: Ocaramba.HelpersAssembly: OcarambaLite (in OcarambaLite.dll) Version: 4.2.6+43a78d4b91293779f9bddc600324863f323e0ac6
Syntaxpublic 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
StringFull path to taken screenshot.
ExampleHow to use it:
var iFrame = this.Driver.GetElement(this.iframe);
this.Driver.SwitchTo().Frame(0);
var el = this.Driver.GetElement(this.elelemtInIFrame);
var fullPath = TakeScreenShot.TakeScreenShotOfElement(el, Directory.GetCurrentDirectory() + BaseConfiguration.ScreenShotFolder, "MenuOutSideTheIFrame");
See Also