Blurred screenshots with Selenium Webdriver
Not sure what could be wrong here as the same code has been working for me on other machines. The only possibility that I see is an issue with the configuration on the machine but can't find what that issue is.
The same scripts when ran in IE, it renders the correct screenshot, so it could be a chrome specific issue. Have uninstalled & reinstalled chrome but still the same.
I am using Selenium 2.28.0 version.
Please let me know if anyone needs more inputs my issue. Any hint to resolve this would be really helpful.
Mystic last edited by user
First you need to update your selenium jar file and then try this code, i hope this code works.
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE); // Now you can do whatever you need to do with it, for example copy somewhere FileUtils.copyFile(scrFile, new File("C:\\eclipse\\scrennshot\\screenshot.png"));