Hi All,
Below is an example that helps to get the test method name, before executing
A quick example for the people who are very lazy like me
@BeforeMethod
@Parameters("selenium.screenShotFolder")
protected void captureScreenShotBefore(String folder,Method method) {
String data = getSelenium().captureScreenshotToString();
String fileName=method.getName()+"_before.png";
Reporter.log(""+fileName+"");
FileUtil.writeToFile(data,folder+fileName);
}
Thanks & Regards
Balaji
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment