You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if the value of the an annotated field is null, and exception is thrown.
@DriverUrl()
static String driverUrl = null;
This does not cause a failure in the test, but does emit a spooky stack trace
Possibly use Optional.ofNullable instead of Optional.of.
Our tests will use local browsers if the remote driver is not running, we do this by setting driverUrl to null.
2023-09-12 15:59:33 [main] WARN i.g.b.seljup.AnnotationsReader.seekFieldAnnotatedWith(174) -- Exception seeking field in null annotated with interface io.github.bonigarcia.seljup.DriverUrl
java.lang.NullPointerException: null
at java.base/java.util.Objects.requireNonNull(Objects.java:221)
at java.base/java.util.Optional.<init>(Optional.java:107)
at java.base/java.util.Optional.of(Optional.java:120)
at io.github.bonigarcia.seljup.AnnotationsReader.getField(AnnotationsReader.java:193)
at io.github.bonigarcia.seljup.AnnotationsReader.seekFieldAnnotatedWith(AnnotationsReader.java:163)
at io.github.bonigarcia.seljup.AnnotationsReader.seekFieldAnnotatedWith(AnnotationsReader.java:145)
at io.github.bonigarcia.seljup.AnnotationsReader.getUrl(AnnotationsReader.java:100)
at io.github.bonigarcia.seljup.SeleniumJupiter.findUrl(SeleniumJupiter.java:276)
at io.github.bonigarcia.seljup.SeleniumJupiter.resolveSeleniumWebDriver(SeleniumJupiter.java:188)
at io.github.bonigarcia.seljup.SeleniumJupiter.resolveParameter(SeleniumJupiter.java:170)
at io.github.bonigarcia.seljup.SeleniumJupiter$1$1.resolveParameter(SeleniumJupiter.java:604)
at org.junit.jupiter.engine.execution.ParameterResolutionUtils.resolveParameter(ParameterResolutionUtils.java:136)
at org.junit.jupiter.engine.execution.ParameterResolutionUtils.resolveParameters(ParameterResolutionUtils.java:103)
at org.junit.jupiter.engine.execution.ParameterResolutionUtils.resolveParameters(ParameterResolutionUtils.java:64)
at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:84)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$7(TestMethodTestDescriptor.java:217)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:213)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:138)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
at ```
The text was updated successfully, but these errors were encountered:
Description of the problem:
if the value of the an annotated field is null, and exception is thrown.
This does not cause a failure in the test, but does emit a spooky stack trace
Possibly use
Optional.ofNullable
instead ofOptional.of
.Our tests will use local browsers if the remote driver is not running, we do this by setting
driverUrl
to null.The text was updated successfully, but these errors were encountered: