Java 类的重复注释:interface org.testng.annotations。预处理法

Java 类的重复注释:interface org.testng.annotations。预处理法,java,selenium,testng,Java,Selenium,Testng,我对Selenium Java是新手。运行java类时,会显示以下错误: [RemoteTestNG]检测到TestNG版本6.14.3 java.lang.annotation.AnnotationFormatError:的注释重复 类:接口org.testng.annotations.BeforeMethod: @org.testng.annotations.BeforeMethod(inheritGroups=true, dependsOnGroups=[],dependsOnMethod

我对Selenium Java是新手。运行java类时,会显示以下错误:

[RemoteTestNG]检测到TestNG版本6.14.3 java.lang.annotation.AnnotationFormatError:的注释重复 类:接口org.testng.annotations.BeforeMethod: @org.testng.annotations.BeforeMethod(inheritGroups=true, dependsOnGroups=[],dependsOnMethods=[],firstTimeOnly=false, 组=[],描述=,始终运行=false

replicate annotation
是什么意思?我应该在哪里调试

Env:EclipseNeon、Mac、Maven项目、TestNg框架。

我刚想出来。 在一个“测试基类”中,我错打印了

@BeforeMethod标记两次,因此在运行java类时,它显示了上述错误。 删除额外的@BeforeMethod标记,解决了这个问题。

我刚刚发现。 在一个“测试基类”中,我错打印了

@BeforeMethod标记两次,因此在运行java类时,它显示了上述错误。 删除额外的@BeforeMethod标记,解决了此问题