package com.selenium;
import org.openqa.selenium.*;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class MySelenium {

    public static void main(String[] args) {
      System.setProperty("webdriver.chrome.driver", "C:\\Selenium\\chromedriver_win32.exe");
      WebDriver driver = new ChromeDriver();

path is correct , but it showing this issue . what will i do after this ?

  • 1
    Everything seems to be correct - double check the path.
    – Moro
    Nov 12 '19 at 7:55
  • Can you run this executable manually? Try to execute it from command line and check if any error is reported.
    – wec
    Nov 12 '19 at 11:45
  • yes i m running this manually , could u share this cmd line program to run it ? Nov 13 '19 at 4:47
  • 1
    @SupriyaDas After reading the whole discussion. First: please share the screenshot of your folder structure and Second: Try changing the path as "C:\\Selenium\\chromedriver_win32\\chromedriver.exe" and share the result of success or failure. Don't let the discussion open-ended. Nov 13 '19 at 12:54

Download latest chrome driver from this link : Download

Extract the zip and Copy choromedriver.exe in E or C

  • i downloaded current version 78.0.3904.70 according to my chrome version (78.0.3904.97) and kept that chrome driver file in C . After that only it showing this error . Nov 12 '19 at 6:58
  • There is a problem with the path. Other than that your code is perfect. Your folder name is chromedriver_win32 than you path should be System.setProperty("webdriver.chrome.driver","C:\\Selenium\\chromedriver_win32\\chromedriver.exe"); Nov 13 '19 at 4:34
  • this path is 100% correct . i copied this path n i pasted it . Nov 13 '19 at 4:49
  • Can you please attach the screenshot of your folder structure where your chromedriver is located? It would help to resolve your problem. Nov 13 '19 at 5:06
  • Attachment icon is not present , so how can i upload it ? Nov 13 '19 at 5:40

Tried your code and it's working good excepting changing

"C:\\Selenium\\chromedriver_win32.exe" to "C:\\Selenium\\chromedriver.exe".

"chromedriver_win32" is zip.

It will be "chromedriver.exe" after extracted zip.

  • . but chromedriver_win32 is my folder name . i already extracted it from the zip file . This single forward slash path is not working . Nov 13 '19 at 4:32
  • For your path "C:\\Selenium\\chromedriver_win32.exe" --> It does NOT file name "chromedriver_win32.exe". It only has folder "chromedriver_win32" where contains driver file "chromedriver.exe" and you need to point to this file .exe
    – phong tran
    Nov 13 '19 at 5:23
  • chromedriver_win32 is my folder name n i need to give point for exe file . show i wrote at last chromedrive _win32.exe . Nov 13 '19 at 5:36
  • Did you rename exe file to "chromedriver_32.exe"? As I know after extracted zip file, its name of file .exe is "chromedriver.exe"
    – phong tran
    Nov 13 '19 at 6:34
  • I attached one Path screenshot just go through this . Did you read my comments ? I told you many times chromedriver_win32 is my location folder name where chromedriver.exe file is present . Nov 13 '19 at 8:15

Prerequisite conditions for a successful run.

  1. Make sure you have downloaded the correct ChromeDriver according to your Chrome version link- https://chromedriver.storage.googleapis.com/index.html?path=81.0.4044.69/
  2. ChromeDriver should be in the C drive, also extracted.
  3. Code should be as follows- System.setProperty("webdriver.chrome.driver", "C:\Selenium\chromedriver.exe"); WebDriver driver= new ChromeDriver(); driver.get("https://www.google.com"); Path should be correct with proper spellings, convert all the single slashs into double and add chromedriver.exe at the end of path.
  4. Another solution without System.setProperty is simply adding a folder with chromedriver.exe to PATH (if someone doesn't know how - google "set path variable"). To check that this approach works you may put chromedriver.exe to C:\Windows\System32 folder

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.