diff --git a/jdi-light-angular-tests/src/main/java/io/github/com/pages/NewAngularPage.java b/jdi-light-angular-tests/src/main/java/io/github/com/pages/NewAngularPage.java index c56646a29f..af44feee24 100644 --- a/jdi-light-angular-tests/src/main/java/io/github/com/pages/NewAngularPage.java +++ b/jdi-light-angular-tests/src/main/java/io/github/com/pages/NewAngularPage.java @@ -6,6 +6,7 @@ import java.lang.reflect.Field; +import static com.epam.jdi.light.common.Exceptions.runtimeException; import static com.epam.jdi.light.elements.pageobjects.annotations.objects.FillFromAnnotationRules.fieldHasAnnotation; public abstract class NewAngularPage extends WebPage implements ISetup { @@ -13,7 +14,7 @@ public abstract class NewAngularPage extends WebPage implements ISetup { @Override public void setup(Field field) { if (!fieldHasAnnotation(field, Url.class, NewAngularPage.class)) { - throw new RuntimeException("AngularPage does not have an Url annotation."); + throw runtimeException("AngularPage does not have an Url annotation."); } pageLink = field.getAnnotation(Url.class).value().substring(1); }