Open fescobar opened 5 years ago
Don't experience this issue with MS Edge. Use the same code. Use selenium-java version 3.141.59.
But I experience this issue with IE11:
Screenshot screen = new AShot() .shootingStrategy(ShootingStrategies.viewportPasting(1000))
.takeScreenshot(driver);
Part of stack trace:
at ru.yandex.qatools.ashot.shooting.ViewportPastingDecorator.getCurrentScrollY(ViewportPastingDecorator.java:79)
at ru.yandex.qatools.ashot.shooting.ViewportPastingDecorator.getScreenshot(ViewportPastingDecorator.java:54)
at ru.yandex.qatools.ashot.AShot.takeScreenshot(AShot.java:116)
at ru.yandex.qatools.ashot.AShot.takeScreenshot(AShot.java:132)
I'm trying to take a full screenshot for EDGE. It works for CHROME/FIREFOX at least.
When I tried to do that using EDGE, throws this error:
I see you are getting the size using javascript: https://github.com/pazone/ashot/blob/master/src/main/java/ru/yandex/qatools/ashot/shooting/ViewportPastingDecorator.java#L67
I think this error happened because that method can't execute javascript for this specific browser. Why don't try to get the size from the Selenium Driver?
I think with this fix, it will run in any browser. What do you think?