Selenide SLF4J:无法加载 class "org.slf4j.impl.StaticLoggerBinder" error.Any 想法?

Selenide SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" error.Any thoughts?

我是 Selenide 的新手,正在尝试 运行 使用 Selenide 和 Junit 依赖项的浏览器。但是,我得到了

SLF4J:无法加载 class "org.slf4j.impl.StaticLoggerBinder" error.Any 想法?

xmlns="http://maven.apache.org/POM/4.0.0"

     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>1</groupId>
<artifactId>1</artifactId>
<version>1.0-SNAPSHOT</version>

<!-- https://mvnrepository.com/artifact/com.codeborne/selenide -->
<dependencies>
<dependency>
    <groupId>com.codeborne</groupId>
    <artifactId>selenide</artifactId>
    <version>4.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.12</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-nop -->

import com.codeborne.selenide.Configuration;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static com.codeborne.selenide.Selenide.close;
import static com.codeborne.selenide.Selenide.open;

public class ChromeStart {
    @Before
    public void RunURL() {
        Configuration.browser= "chrome";
        open ("http://google.com");
    }
    @Test
    public void StartBrowser() {
        System.out.println("Hello world")
    }
    @After
    public void CloseURL(){
        close();
    }
}

这个错误很可能是缺少依赖项的结果。 尝试将以下依赖项添加到您的 pom.xml 文件并再次 运行 您的测试。

<dependency>
  <groupId>org.slf4j</groupId>
  <artifactId>slf4jnop</artifactId>
  <version>1.7.21</version>
</dependency>