类的重复注释:interface org.testng.annotations。 BeforeMethod

问题描述 投票:1回答:1

我是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框架。

java selenium testng
1个回答
0
投票

我才想通了。在其中一个'测试基类'中,我被印刷了

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

© www.soinside.com 2019 - 2024. All rights reserved.