Annotation Interface After


@Retention(RUNTIME) @Target(METHOD) public @interface After
A equivalent of JUnit @After.

It should be used instead of JUnit @After annotation when screenshot is configured on ConfigurationProperties.TriggerMode.AUTOMATIC_ON_FAIL value to make sure screenshot is taken just after the exception occurs, and before @After methods are invoked.

When using default JUnit @After annotation, screenshot is taken after the invocation of @After methods and may cause hard to diagnose errors when After change the state of the underlying web application.

See Also: