I've imported this project before, with no difficulty before. I'm not sure what has changed.
I click Import Project
and selected getting-started-with-selenium
(http://github.com/ddavison/getting-started-with-selenium) which is a Maven project, and an old Eclipse project. I clicked the directory, then in the "Select libraries" or whatever, i selected Maven
.
I've changed my build path to match correctly...
src/
main/
java/ <-- source folder.
tests/
java/ <-- tests folder.
But yet, I get "Cannot resolve symbol 'After'"
Even though in the maven libraries, I see it clearly.
Let me know if there is any additional information needed.
Make sure that if JUnit is declared as <scope>test</scope>
, that your test class is in src/test
, otherwise it won't be able to see the dependency.
Make sure that you can compile the project through Maven (that is, via command line) through mvn clean compile
.
If that generates errors, be sure that you have the junit dependency properly scoped in the POM.
If that doesn't generate errors, then it's IntelliJ that doesn't know where the new libraries are.
To fix that, simply go to the Maven Projects tab in the main window, and hit the "Generate Sources and Update Folders for All Projects" button. Then, hit "Reimport All Maven Projects", which is next to the previous button.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With