I made a java application that compares screenshots taken from our staging environment against the production ones. The app fails due to different screenshot sizes.
How can I define the screenshot size? I am using the following code to generate the screenshot.
final WebDriver driver = new FirefoxDriver();
try {
driver.manage().window().setSize(new Dimension(1024, 768));
driver.get(link);
File outputFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
....