public void runOnInvariantViolationPlugins ( Invariant invariant , CrawlerContext context ) { LOGGER . debug ( "Running OnInvariantViolationPlugins..." ) ; counters . get ( OnInvariantViolationPlugin . class ) . inc ( ) ; for ( Plugin plugin : plugins . get ( OnInvariantViolationPlugin . class ) ) { if ( plugin instanceof OnInvariantViolationPlugin ) { try { LOGGER . debug ( "Calling plugin {}" , plugin ) ; ( ( OnInvariantViolationPlugin ) plugin ) . onInvariantViolation ( invariant , context ) ; } catch ( RuntimeException e ) { reportFailingPlugin ( plugin , e ) ; } } } }
Run the OnInvariantViolation plugins when an Invariant is violated . Invariant are checked when the state machine is updated that is when the dom is changed after a click on a clickable . When a invariant fails this kind of plugins are executed . Warning the session is not a clone changing the session can cause strange behaviour of Crawljax .