简体   繁体   English

带有 java @FindBy 注释的 selenium 无法解析为类型

[英]selenium with java @FindBy annotation cannot be resolved as a type

I am using selenium with java and the following pom package,我在 java 和以下 pom 包中使用 selenium,

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>

I am able to use WebDriver and other object but when i try to use the annotation @FindBy it seems that my project cannot find a package that satisfy it "cannot be resolved as a type" as well it does not propose to use the selenium package.我可以使用 WebDriver 和其他对象,但是当我尝试使用注释 @FindBy 时,似乎我的项目找不到满足“无法解析为类型”的包,而且它也不建议使用 selenium 包.

In which maven repository is located the annotation system from selenium ? selenium 的注释系统位于哪个 Maven 存储库中? Or am i missing something here ?还是我在这里遗漏了什么?

Thank you谢谢

您可以从包含软件包的 selenium 网站下载客户端组合 jar (import org.openqa.selenium.support.FindBy;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM