Nullpointer Excpetion while trying to create gspec file using new feature Spec Generator in Release 2.4
Getting Nullpointer exception while calling the method generateSpecSections with PageSpecGenerationResult object as a parameter.
Could you please provide clear steps to reproduce? Even better - could you please share the sample project?
I would like to generate a spec file automatically using the 'Spec Generator' feature in 2.4 by passing the PageDump json file as an input.
But i'm getting Null pointer exception while calling the method generateSpecSections in SpecGenerator.
Please help me here.
It is not really clear how to reproduce this issue. Could you please share the pagedump and exact command that reproduces this issue?
Attached the pagedump json file for reference.
Command that throws Nullpointer exception specGenerator.generateSpecSections(result)
Please let me know if you need any other details
Thanks for the sample file! I did manage to reproduce. Now all I need is to find some time and fix it.
Thank you ishubin.
May i know the issue behind this please.
I have pushed a fix in the master branch. Tomorrow will try to make a minor release once I fix another issue.
I couldn't reproduce this issue with my own simplified page dump. But in your example it was failing on these two elements fleethome-ourapproach-container and fleethome-ourapproach-container-img.
Maybe the reason is that they are located off-screen as fleethome-ourapproach-container was located with -8 left position, but I am not sure
Hi Team, I am encountering the similar issue when am trying to generate spec file. I have attached log below. Can some one please help. Have attached page dump in zip format
galen generate "LayoutTest/galen-sample-tests-master/dumps/homepage/page.json" --export "LayoutTest/galen-sample-tests-master/specs/homePageNew.gspec" --no-galen-extras Exception in thread "main" java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "com.fasterxml.jackson.databind.JsonNode.get(String)" because "jsonTree" is null at com.galenframework.GalenMain.execute(GalenMain.java:60) at com.galenframework.GalenMain.main(GalenMain.java:78) Caused by: java.lang.NullPointerException: Cannot invoke "com.fasterxml.jackson.databind.JsonNode.get(String)" because "jsonTree" is null at com.galenframework.generator.PageItemJsonMapper.loadItems(PageItemJsonMapper.java:31) at com.galenframework.generator.SpecGenerator.generate(SpecGenerator.java:39) at com.galenframework.actions.GalenActionGenerate.execute(GalenActionGenerate.java:42) at com.galenframework.GalenMain.execute(GalenMain.java:58) ... 1 more homepage.zip