java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property

 


Polymorphism  in Java (Rules)

  • Note:- If you get below exception then please set path for the chrome driver properly you must have missed something in the path

    Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver. The latest version can be downloaded from http://chromedriver.storage.googleapis.com/index.html

    To set the path of the chrome you need below java function.

    System.setProperty:

    1.  This is the function given by java to set the path of any exe, this function takes two parameters as Key and Value.

    2.  To set the key we need to write “webdriver.chrome.driver”.

    3.  To set the Value we need to add the path where the browser exe present as shown “C:\\Users\\Downloads\\seleniumjar\\chromedriver.exe”.

Post a Comment