Error in launching google Chrome browser without System.setProperty() command | Selenium Forum
SMITA KURARIA Posted on 12/02/2020

I just want to launch chrome browser without System.setProperty cmd ….. I did setup drivers path in env variable too and restarted system. However when I am running code to launch chrome browser without using System.setProperty cmd its giving me error Exception in thread "main" java.lang.IllegalStateException:


Any Thought ?


public class LaunchBrowser {
public static void main (String[] args)throws InterruptedException{

// System.setProperty("", "C:\\smita docs\\selenim 0128\\Drivers\\chromedriver_win32 (1)\\chromedriver.exe");
ChromeDriver driver = new ChromeDriver();


Error :-

Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the system property;


Ashish Replied on 13/02/2020

Please make sure that the path variable is set to the below path.

"C:\\smita docs\\selenim 0128\\Drivers\\chromedriver_win32 (1)\\

Related Posts