我是Selenium Java的新手。运行java类时,它显示以下错误:
[RemoteTestNG]检测到TestNG版本6.14.3 java.lang.annotation.AnnotationFormatError:类的复制注释:interface org.testng.annotations.BeforeMethod:@ org.testng.annotations.BeforeMethod(inheritGroups = true,dependsOnGroups = [],dependsOnMethods = [],firstTimeOnly = false,groups = [],description =,alwaysRun = false,
Duplicate annotation
是什么意思,我应该在哪里调试?
环境:Eclipse Neon,Mac,Maven项目,TestNg框架。
我才想通了。在其中一个'测试基类'中,我被印刷了
@BeforeMethod标记两次,因此在运行java类时它显示上面提到的错误。删除额外的@BeforeMethod标记,解决了这个问题。