'ChromeDriver 101.0.4951.64 not available for download. Selenium could not start a new session

I want to use a Java script with Selenium.

I have installed in a Mac Google Chrome Version 101.0.4951.64 but there is not available this version for ChromeDriver

Chromedriver Chromium Downloads

And I get the following error:

Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session.

Response code 500. Message: unknown error: DevToolsActivePort file doesn't exist

Does anyone know how to solve this issue?

Also, there is a ChromeDriver 102.0.5005.27 but I can not get Chrome version 102 to download.

I already solved my issue using WebDriverManager which auto download the needed driver, I don't delete the question and my solution because it could help others.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source