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

I am using selenium with java and the following pom package, <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…

Details