I get the following error while launching chrome driver. Any suggestions?
package packag;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Demo2
{
public static void main (String [] args)
{
System.setProperty("webdriver.chrome.driver","C:/chromedriver.exe");
WebDriver driver= new ChromeDriver();
driver.get("http://www.google.com");
driver.close();
}
}
Starting ChromeDriver 2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4) on port 26665 Only local connections are allowed. Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: cannot find Chrome binary (Driver info: chromedriver=2.21.371459 (36d3d07f660ff2bc1bf28a75d1cdabed0983e7c4),platform=Windows NT 6.2 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 754 milliseconds Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58' System info: host: 'Vishak', ip: '192.168.0.23', os.name: 'Windows 8', os.arch: 'amd64', os.version: '6.2', java.version: '1.8.0_25' Driver info: org.openqa.selenium.chrome.ChromeDriver at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at
org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:144) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:170) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:159) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:116) at packag.Demo2.main(Demo2.java:11)