I am trying to do some automation projects with chrome, java and selenium and having problems importing the chrome driver.
Error: import org.openqa.selenium.chrome.chromedriver cannot be resolved
Can anyone help me for this ?
I am trying to do some automation projects with chrome, java and selenium and having problems importing the chrome driver.
Error: import org.openqa.selenium.chrome.chromedriver cannot be resolved
Can anyone help me for this ?
Try cleaning your project by navigating to the following menu item:
Project > Clean...
then click on Project > Build Automatically
If that doesn't work, try removing the jars from the build path and adding them again.
please take a look at the code here - https://gist.github.com/ajinkya-mundankar/3768339eeb54755d937386138582dca0
you can refer from here - Eclipse error: "The import XXX cannot be resolved"
If You are using Selenium 3.x you have to mention the Key-Value
pair using
System.setProperty()
line mandatory as follows :
System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver");
Sample code is like this
public class SitePoster {
System.setProperty("webdriver.chrome.driver", "./pathtodriver");
WebDriver driver = new ChromeDriver();
driver.get("//https://google.co.in")