0
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();
      driver.get("https://login.yahoo.com");
    }
}

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 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 at 11:45
  • yes i m running this manually , could u share this cmd line program to run it ? – Supriya Das Nov 13 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. – Himanil Gupta Nov 13 at 12:54
1

Download latest chrome driver from this link : Download

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

System.setProperty("webdriver.chrome.driver","E:\\chromedriver.exe");
  • 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 . – Supriya Das Nov 12 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"); – Denish Makwana Nov 13 at 4:34
  • this path is 100% correct . i copied this path n i pasted it . – Supriya Das Nov 13 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. – Denish Makwana Nov 13 at 5:06
  • Attachment icon is not present , so how can i upload it ? – Supriya Das Nov 13 at 5:40
0

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 . – Supriya Das Nov 13 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 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 . – Supriya Das Nov 13 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 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 . – Supriya Das Nov 13 at 8:15

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.