I am trying to capture a screenshot of a webpage using the mentioned below script:
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File("D:\\screenshot.jpg"));
I am getting an error as "The method copyFile(File, File) is undefined for the type FileUtils
". I have imported package import java.io.IOException; and import com.sun.jna.platform.FileUtils;
Please help me on this!