When i try to use Ashot to take screenshots of errors on my pc i have a probleme where the images of the website arent taking completly.

What we have when we execute the code :

enter image description here

What we want :

enter image description here

When i checked the problem is linked to my computer being 125% and not 100% on the zoom of browsers

enter image description here

Even though i added the code that i found as a solution on the internet :

    Screenshot screenshot = new AShot().shootingStrategy(ShootingStrategies.viewportPasting(ShootingStrategies.scaling(1.25f), 1000)).takeScreenshot(driver);

My original code :

Screenshot screenshot = new AShot().shootingStrategy(ShootingStrategies.viewportPasting(1000))

It still doesn't work is there a solution for this probleme ?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.