Setting Chrome Driver for Selenium
import org.openqa.selenium.chrome.*; public class Test { public static void main(String[] args) throws Exception { System.setProperty("webdriver.chrome.driver", "D:\\Dumps\\TestingTools\\chromedriver_win32\\chromedriver.exe"); ChromeDriver f=new ChromeDriver(); f.get("http://localhost/freshfruitnveg.in"); System.out.println(f.getTitle()); System.out.println(f.getCurrentUrl()); System.out.println(f.getPageSource()); f.quit(); } } URL to download gecko driver https://github.com/mozilla/geckodriver/releases URL to download chrome driver for Chrome 58+ http://chromedriver.storage.googleapis.com/index.html?path=2.28/