@ Override public void onNewState ( CrawlerContext context , StateVertex vertex ) { LOG . debug ( "onNewState" ) ; StateBuilder state = outModelCache . addStateIfAbsent ( vertex ) ; visitedStates . putIfAbsent ( state . getName ( ) , vertex ) ; saveScreenshot ( context . getBrowser ( ) , state . getName ( ) , vertex ) ; outputBuilder . persistDom ( state . getName ( ) , context . getBrowser ( ) . getUnStrippedDom ( ) ) ; }
Saves a screenshot of every new state .