org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: Chrome failed to start: exited normally. why iam getting this issue. my requirement is to run my selenium script with my windows installed chrome browser.can any one please help me out

iam using this below code for opening browser, when ran the code it's successfully opening my local windows chrome browser, for that next step entering url it's failing and it's giving the above issue

ChromeOptions o=new ChromeOptions();
        o.addArguments("user-data-dir=C:\\\\Users\\\\Hemadri Reddy\\\\AppData\\\\Local\\\\Google\\\\Chrome\\\\User Data");
        o.setBrowserVersion("120.0.6099.71");
        WebDriver d=new ChromeDriver(o);
        d.get("https://tester.com");

i updated my selenium dependency with 4.12.0
enter image description here

i wanted to run my selenium script with my local windows chrome browser

2

There are 2 best solutions below

1
On

Try removing o.setBrowserVersion("120.0.6099.71") and run the code.

2
On

new additional argument addArguments('--remote-debugging-pipe')