-
Notifications
You must be signed in to change notification settings - Fork 155
Description
Hi,
I was trying to take full page screenshot and so far no luck. Versions i tried are 1.5.4,1.4.4,1.46.
I tried this and full page screenshot is not captured.
Screenshot screenshot = (new AShot()).takeScreenshot(getDriver());
Then i tried this code getting java.lang.arithmeticexception error:
Screenshot screenshot = new AShot().shootingStrategy(new ViewportPastingStrategy(1500)).takeScreenshot(driver());
Error:
java.lang.ArithmeticException: / by zero
at ru.yandex.qatools.ashot.screentaker.VerticalPastingShootingStrategy.getScreenshot(VerticalPastingShootingStrategy.java:37) ~[ashot-1.4.6.jar:?]
at ru.yandex.qatools.ashot.screentaker.ScreenTaker.take(ScreenTaker.java:23) ~[ashot-1.4.6.jar:?]
at ru.yandex.qatools.ashot.AShot.takeScreenshot(AShot.java:166) ~[ashot-1.4.6.jar:?]
at com.automation.report.AllureManager.takeFullScreenshot(AllureManager.java:153) ~[classes/:?]
at com.automation.report.AllureManager.takeScreenshotToAttachOnAllureReport(AllureManager.java:98) ~[classes/:?]
at com.automation.AllureStepListener.afterStepUpdate(AllureStepListener.java:40) ~[test-classes/:?]
at io.qameta.allure.listener.LifecycleNotifier.lambda$runSafely$0(LifecycleNotifier.java:211) ~[allure-java-commons-2.17.3.jar:2.17.3]
at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
at io.qameta.allure.listener.LifecycleNotifier.runSafely(LifecycleNotifier.java:209) ~[allure-java-commons-2.17.3.jar:2.17.3]
at io.qameta.allure.listener.LifecycleNotifier.afterStepUpdate(LifecycleNotifier.java:193) ~[allure-java-commons-2.17.3.jar:2.17.3]
at io.qameta.allure.AllureLifecycle.updateStep(AllureLifecycle.java:521) ~[allure-java-commons-2.17.3.jar:2.17.3]
at io.qameta.allure.AllureLifecycle.updateStep(AllureLifecycle.java:501) ~[allure-java-commons-2.17.3.jar:2.17.3]
at io.qameta.allure.aspects.StepsAspects.stepStop(StepsAspects.java:92) ~[allure-java-commons-2.17.3.jar:2.17.3]