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
Tuesday, May 25, 2010
Subscribe to:
Posts (Atom)