Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black window appearing in screenshot #239

Open
snehaagrawal6034 opened this issue Aug 19, 2021 · 0 comments
Open

Black window appearing in screenshot #239

snehaagrawal6034 opened this issue Aug 19, 2021 · 0 comments

Comments

@snehaagrawal6034
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant