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

Null pointer Exception in ASHOT 1.5.4 #230

Open
abhishek140389 opened this issue Jun 28, 2021 · 0 comments
Open

Null pointer Exception in ASHOT 1.5.4 #230

abhishek140389 opened this issue Jun 28, 2021 · 0 comments

Comments

@abhishek140389
Copy link

abhishek140389 commented Jun 28, 2021

Hi Team,

i am unable to take full page screenshot , my code is below, i am using java 8.
ChromeOptions options = new ChromeOptions();
//options.addArguments("headless");
driver = new ChromeDriver(options);
driver.get("https://aib.ie");
driver.manage().window().maximize();
Screenshot screenshot=new AShot().shootingStrategy(ShootingStrategies.viewportPasting(1000)).takeScreenshot(driver); //getting error here while taking full page screenshot.

Maven

org.seleniumhq.selenium selenium-java 3.13.0 compile
		<!-- https://mvnrepository.com/artifact/ru.yandex.qatools.ashot/ashot -->
		<dependency>
			<groupId>ru.yandex.qatools.ashot</groupId>
			<artifactId>ashot</artifactId>
			<version>1.5.4</version>
			<scope>compile</scope> 
		</dependency>

Error

rg.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught Throwable
java.lang.RuntimeException: java.lang.NullPointerException
at ru.yandex.qatools.ashot.util.InnerScript.execute(InnerScript.java:32)
at ru.yandex.qatools.ashot.shooting.ViewportPastingDecorator.getFullHeight(ViewportPastingDecorator.java:67)
at ru.yandex.qatools.ashot.shooting.ViewportPastingDecorator.getScreenshot(ViewportPastingDecorator.java:41)
at ru.yandex.qatools.ashot.shooting.ViewportPastingDecorator.getScreenshot(ViewportPastingDecorator.java:35)
at ru.yandex.qatools.ashot.AShot.takeScreenshot(AShot.java:145)

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