I found a similar error like mine in stackoverflow, and added the jar selenium webdriver files to the project using the method below:
right click on the project โ assembly build path โ configure build path โ click โAdd external banksโ โ add selenium jar files from your local machine โ click ok โ now mouseover on WebDriver in your code โ click โimport webdriverโ - now run your code -> you will get rid of the exception.
However, I still get the error message. Here's the error:
An exception in the "main" thread java.lang.Error: unresolved compilation problems: WebDriver cannot be resolved for type FirefoxDriver cannot be resolved for type
webdriver selenium-firefoxdriver
Juvelle
source share