ashot icon indicating copy to clipboard operation
ashot copied to clipboard

Black window appearing in screenshot

Open snehaagrawal6034 opened this issue 3 years ago • 0 comments

Code to repro:

        String url = "https://i.pinimg.com/originals/b0/09/0d/b0090d60fe925d103368baf523478ff4.png";
        getWebDriver().get(url);
        findElement(By.tagName("img"), "image").shouldBe(visible);
        WebElement webElement = getWebDriver().findElement(By.tagName("img"));
        sleep(3000);
        Screenshot screenshot = new AShot()
                .coordsProvider(new WebDriverCoordsProvider())
                .shootingStrategy(ShootingStrategies.viewportPasting(100))
                .takeScreenshot(getWebDriver());
        File actualFile = new File("arbit.png");
        try {
            ImageIO.write(screenshot.getImage(), "png", actualFile);
        } catch (IOException e) {
            e.printStackTrace();
        }

Final screenshot: AShot image_capture

Version: 1.5.4

snehaagrawal6034 avatar Aug 19 '21 10:08 snehaagrawal6034