I am new to Selenium for the purpose of familiarizing for an internship. Currently, I am having a problem with importing chromedriver jar. I am currently using Java 12. It is weird because the error seems to go away when I switch the compiler to Java 1.8. Can anyone help me with this problem?
package co.edureka.selenium.webdriver.sj;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class launchbrowser {
public static WebDriver driver = null;
public static void main(String[] args) {
System.setProperty("webdriver.chrome.driver",".\\Driver\\chromedriver.exe");
driver = new ChromeDriver();
driver.navigate().to("https://amazon.com");
}
}
"import org.openqa.selenium.chrome.ChromeDriver" displays this error
"The type org.openqa.selenium.chrome.ChromeDriver is not accessible";
"ChromeDriver()" displays this error
"ChromeDriver cannot be resolved to a type"