Good afternoon guys.
I'm using FirefoxDriver in version 2.53.0 and taking a snapshot of a site is generating an image with very large dimensions (111159x17555).
Does anyone know a way to fix this problem?
I've tried setting the browser dimension with the following code:
driver.manage().window().setSize(new Dimension(1366, 768));
And the problem persisted.
Here is an example of a snapshot that was generated.
Here is the code used to take the snapshot:
public static void saveScreenshot(WebDriver driver, String path) {
File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
try {
FileUtils.copyFile(scrFile, new File(path));
} catch (IOException e) {
e.printStackTrace();
}
}