Selenium 自动化
1、chromedriver环境变量已配置好,但是运行测试启动时,跑异常(com.google.common.util.concurrent.SimpleTimeLimiter)启动失败
/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/bin/java -ea -Didea.test.cyclic.buffer.size=1048576 -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=60525:/Applications/IntelliJ IDEA.app/Contents/bin -Dfile.encoding=UTF-8 -classpath /Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar:/Users/hongni/.m2/repository/org/junit/vintage/junit-vintage-engine/5.7.2/junit-vintage-engine-5.7.2.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/junit/lib/junit5-rt.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/junit/lib/junit-rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home/lib/tools.jar:/Users/hongni/ideaProjects/hogwarts/target/test-classes:/Users/hongni/ideaProjects/hogwarts/target/classes:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/boot/spring-boot-starter-web/2.5.2/spring-boot-starter-web-2.5.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/boot/spring-boot-starter/2.5.2/spring-boot-starter-2.5.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/boot/spring-boot/2.5.2/spring-boot-2.5.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/boot/spring-boot-autoconfigure/2.5.2/spring-boot-autoconfigure-2.5.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/boot/spring-boot-starter-logging/2.5.2/spring-boot-starter-logging-2.5.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/apache/logging/log4j/log4j-to-slf4j/2.14.1/log4j-to-slf4j-2.14.1.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/apache/logging/log4j/log4j-api/2.14.1/log4j-api-2.14.1.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/slf4j/jul-to-slf4j/1.7.31/jul-to-slf4j-1.7.31.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/boot/spring-boot-starter-json/2.5.2/spring-boot-starter-json-2.5.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.12.3/jackson-datatype-jdk8-2.12.3.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.12.3/jackson-datatype-jsr310-2.12.3.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/fasterxml/jackson/module/jackson-module-parameter-names/2.12.3/jackson-module-parameter-names-2.12.3.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/boot/spring-boot-starter-tomcat/2.5.2/spring-boot-starter-tomcat-2.5.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/apache/tomcat/embed/tomcat-embed-core/9.0.48/tomcat-embed-core-9.0.48.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/apache/tomcat/embed/tomcat-embed-el/9.0.48/tomcat-embed-el-9.0.48.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.48/tomcat-embed-websocket-9.0.48.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/spring-web/5.3.8/spring-web-5.3.8.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/spring-beans/5.3.8/spring-beans-5.3.8.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/spring-webmvc/5.3.8/spring-webmvc-5.3.8.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/spring-aop/5.3.8/spring-aop-5.3.8.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/spring-context/5.3.8/spring-context-5.3.8.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/spring-expression/5.3.8/spring-expression-5.3.8.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/boot/spring-boot-starter-test/2.5.2/spring-boot-starter-test-2.5.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/boot/spring-boot-test/2.5.2/spring-boot-test-2.5.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/boot/spring-boot-test-autoconfigure/2.5.2/spring-boot-test-autoconfigure-2.5.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/jayway/jsonpath/json-path/2.5.0/json-path-2.5.0.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/net/minidev/json-smart/2.4.7/json-smart-2.4.7.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/net/minidev/accessors-smart/2.4.7/accessors-smart-2.4.7.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/ow2/asm/asm/9.1/asm-9.1.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/jakarta/xml/bind/jakarta.xml.bind-api/2.3.3/jakarta.xml.bind-api-2.3.3.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/jakarta/activation/jakarta.activation-api/1.2.2/jakarta.activation-api-1.2.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/hamcrest/hamcrest/2.2/hamcrest-2.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/junit/jupiter/junit-jupiter/5.7.2/junit-jupiter-5.7.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/mockito/mockito-core/3.9.0/mockito-core-3.9.0.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/net/bytebuddy/byte-buddy-agent/1.10.22/byte-buddy-agent-1.10.22.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/objenesis/objenesis/3.2/objenesis-3.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/mockito/mockito-junit-jupiter/3.9.0/mockito-junit-jupiter-3.9.0.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/skyscreamer/jsonassert/1.5.0/jsonassert-1.5.0.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/spring-core/5.3.8/spring-core-5.3.8.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/spring-jcl/5.3.8/spring-jcl-5.3.8.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/spring-test/5.3.8/spring-test-5.3.8.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/xmlunit/xmlunit-core/2.8.2/xmlunit-core-2.8.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/projectlombok/lombok/1.16.10/lombok-1.16.10.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/alibaba/fastjson/1.2.58/fastjson-1.2.58.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.12.4/jackson-dataformat-xml-2.12.4.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/fasterxml/jackson/core/jackson-core/2.12.3/jackson-core-2.12.3.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/fasterxml/jackson/core/jackson-annotations/2.12.3/jackson-annotations-2.12.3.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/fasterxml/jackson/core/jackson-databind/2.12.3/jackson-databind-2.12.3.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/fasterxml/jackson/module/jackson-module-jaxb-annotations/2.12.3/jackson-module-jaxb-annotations-2.12.3.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/codehaus/woodstox/stax2-api/4.2.1/stax2-api-4.2.1.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/fasterxml/woodstox/woodstox-core/6.2.4/woodstox-core-6.2.4.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.12.4/jackson-dataformat-yaml-2.12.4.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/yaml/snakeyaml/1.28/snakeyaml-1.28.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/io/springfox/springfox-swagger2/2.9.2/springfox-swagger2-2.9.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/io/springfox/springfox-spi/2.9.2/springfox-spi-2.9.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/io/springfox/springfox-core/2.9.2/springfox-core-2.9.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/io/springfox/springfox-schema/2.9.2/springfox-schema-2.9.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/io/springfox/springfox-swagger-common/2.9.2/springfox-swagger-common-2.9.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/io/springfox/springfox-spring-web/2.9.2/springfox-spring-web-2.9.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/google/guava/guava/20.0/guava-20.0.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/fasterxml/classmate/1.5.1/classmate-1.5.1.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/slf4j/slf4j-api/1.7.31/slf4j-api-1.7.31.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/plugin/spring-plugin-core/1.2.0.RELEASE/spring-plugin-core-1.2.0.RELEASE.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/springframework/plugin/spring-plugin-metadata/1.2.0.RELEASE/spring-plugin-metadata-1.2.0.RELEASE.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/mapstruct/mapstruct/1.2.0.Final/mapstruct-1.2.0.Final.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/io/swagger/swagger-models/1.5.21/swagger-models-1.5.21.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/io/swagger/swagger-annotations/1.5.21/swagger-annotations-1.5.21.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/io/springfox/springfox-swagger-ui/2.9.2/springfox-swagger-ui-2.9.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/io/springfox/springfox-bean-validators/2.9.2/springfox-bean-validators-2.9.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/assertj/assertj-core/3.19.0/assertj-core-3.19.0.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/junit/jupiter/junit-jupiter-engine/5.7.2/junit-jupiter-engine-5.7.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/apiguardian/apiguardian-api/1.1.0/apiguardian-api-1.1.0.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/junit/platform/junit-platform-engine/1.7.2/junit-platform-engine-1.7.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/junit/platform/junit-platform-runner/1.5.1/junit-platform-runner-1.5.1.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/junit/junit/4.13.2/junit-4.13.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/hamcrest/hamcrest-core/2.2/hamcrest-core-2.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/junit/platform/junit-platform-launcher/1.7.2/junit-platform-launcher-1.7.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/junit/platform/junit-platform-suite-api/1.7.2/junit-platform-suite-api-1.7.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/junit/jupiter/junit-jupiter-params/5.7.2/junit-jupiter-params-5.7.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/junit/jupiter/junit-jupiter-api/5.7.2/junit-jupiter-api-5.7.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/opentest4j/opentest4j/1.2.0/opentest4j-1.2.0.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/junit/platform/junit-platform-commons/1.7.2/junit-platform-commons-1.7.2.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/testng/testng/6.10/testng-6.10.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/beust/jcommander/1.48/jcommander-1.48.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/seleniumhq/selenium/selenium-java/3.141.59/selenium-java-3.141.59.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/seleniumhq/selenium/selenium-api/3.141.59/selenium-api-3.141.59.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/seleniumhq/selenium/selenium-chrome-driver/3.141.59/selenium-chrome-driver-3.141.59.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/seleniumhq/selenium/selenium-edge-driver/3.141.59/selenium-edge-driver-3.141.59.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/seleniumhq/selenium/selenium-firefox-driver/3.141.59/selenium-firefox-driver-3.141.59.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/seleniumhq/selenium/selenium-ie-driver/3.141.59/selenium-ie-driver-3.141.59.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/seleniumhq/selenium/selenium-opera-driver/3.141.59/selenium-opera-driver-3.141.59.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/seleniumhq/selenium/selenium-remote-driver/3.141.59/selenium-remote-driver-3.141.59.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/seleniumhq/selenium/selenium-safari-driver/3.141.59/selenium-safari-driver-3.141.59.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/seleniumhq/selenium/selenium-support/3.141.59/selenium-support-3.141.59.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/net/bytebuddy/byte-buddy/1.10.22/byte-buddy-1.10.22.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/org/apache/commons/commons-exec/1.3/commons-exec-1.3.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/squareup/okhttp3/okhttp/3.14.9/okhttp-3.14.9.jar:/Users/hongni/ideaProjects/ideaProjects/ideaMavenJar/com/squareup/okio/okio/1.14.0/okio-1.14.0.jar com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit5 com.test.demo.hogwarts.seleniumDemo.SeleniumDemoTest,searchTest
Starting ChromeDriver 93.0.4577.15 (660fc11082ba57405eca2e8c49c3e1af756fbfae-refs/branch-heads/4577@{#203}) on port 45185
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Test ignored.
java.lang.NoSuchMethodError: com.google.common.util.concurrent.SimpleTimeLimiter.create(Ljava/util/concurrent/ExecutorService;)Lcom/google/common/util/concurrent/SimpleTimeLimiter;
at org.openqa.selenium.net.UrlChecker.<init>(UrlChecker.java:62)
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:197)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:188)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:79)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:181)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:168)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:123)
at com.test.demo.hogwarts.seleniumDemo.SeleniumDemoTest.setUp(SeleniumDemoTest.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:126)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptBeforeAllMethod(TimeoutExtension.java:68)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllMethods$9(ClassBasedTestDescriptor.java:384)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllMethods(ClassBasedTestDescriptor.java:382)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:196)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:78)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:136)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:221)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Suppressed: java.lang.NullPointerException
at com.test.demo.hogwarts.seleniumDemo.SeleniumDemoTest.tearDown(SeleniumDemoTest.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:688)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:126)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptAfterAllMethod(TimeoutExtension.java:116)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllMethods$11(ClassBasedTestDescriptor.java:412)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeAfterAllMethods$12(ClassBasedTestDescriptor.java:410)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1082)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeAfterAllMethods(ClassBasedTestDescriptor.java:410)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:212)
at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.after(ClassBasedTestDescriptor.java:78)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:149)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:149)
... 29 more
Process finished with exit code 255
处理方式
出现此问题是由于没有添加guava依赖导致的
在项目pom.xml文件追加依赖
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>23.0</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.2</version>
</dependency>