I am currently having a bad first time experience of using this forum, with my questions being repeatedly deleted as duplicates despite my explaining that the suggested fixes are not solving my problem. The cause of the first questioner’s error was incorrect jars, I appear to have the correct ones according to the list proposed in that thread.
This is my code:
package sanityTests;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class Login {
public static void main(String[] args) {
System.setProperty("webdriver.gecko.driver", "/Users/lawrencedonohoe/Downloads/geckodriver");
WebDriver driver = new FirefoxDriver();
}
}
I am getting the following error:
Unresolved compilation problem: WebDriver cannot be resolved to a type FirefoxDriver cannot be resolved to a type
I gather from other forum articles that this is due to not having the correct jars in my build path, or having one I shouldn't. I appear, however, to have all the jar files the aforementioned question's answerers suggest I need. This a full list of the jars I have added:
client-combined-3.14.0-sources
client-combined-3.14.0
byte-buddy-1.8.15
commons-codec-1.10
commons-exec-1.3
commons-logging-1.2
guava-25.0-jre
httpclient-4.5.5
httpcore-4.4.9
okhttp-3.10.0
okio-1.14.1
Can someone please help me?