1
votes

Chrome browser version: 43.0.2357.134 m

Selenium version: selenium-java-3.0.0-beta2

Code:

package Selenium_Practice;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class Launch_NewGen {

public static void main(String[] args) {

    System.setProperty("webdriver.chrome.driver", "C:\\Selenium\\Selenium_Practice\\EXEs\\chromedriver_win32\\chromedriver.exe");
    WebDriver driver = new ChromeDriver();
    driver.get("http://google.com");

}

Error:

Starting ChromeDriver 2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129) on port 19613 Only local connections are allowed. Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: Chrome version must be >= 51.0.2704.0 (Driver info: chromedriver=2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 1.56 seconds Build info: version: 'unknown', revision: '2aa21c1', time: '2016-08-02 14:59:43 -0700' System info: host: 'LON-EKNATHDVM', ip: '10.63.23.191', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_102' Driver info: org.openqa.selenium.chrome.ChromeDriver at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:683) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:247) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:130) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:143) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:170) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:159) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:116) at Selenium_Practice.Launch_NewGen.main(Launch_NewGen.java:17)

Is this the case that chrome browser version is not supportive? Is there any possible resolution without upgrading Chrome browser?

3
As exception clearly states you need to upgrade your chrome version as well...otherwise downgrade your selenium version..:) - Saurabh Gaur
In my case selenium 3.0 works ok, but with the latest chrome browser version and the latest chromedriver 2.23. Update chrome browser or use older version of selenium and possible chromedriver. For the latest selenium i see that you need to specify the driver first and after the -jar selenium-server.jar option - lauda

3 Answers

4
votes

Actually you are using beta version of selenium 3.0, in this might be many bugs. The final selenium 3.0 will be release later, so I would suggest to you downgrade you selenium version to 2.53.1 and work with it until final version of selenium 3.0 would not be released.

Or If you want to work with this selenium 3.0 beta version then you need to upgrade your chrome browser to latest version and download the latest chromedriver as well.

4
votes

The exception posted in the question clearly explains the reason :

Exception in thread "main" org.openqa.selenium.WebDriverException: unknown error: Chrome version must be >= 51.0.2704.0

It is chromedriver and chrome version mismatch. Should not be related to selenium version.

From question : Chrome browser version: 43.0.2357.134 ChromeDriver 2.23.409699 (first line in stacktrace)

Chromedriver 2.23 supports chrome versions 49-52 and 43 is far behind and hence it is generating this exception. (Refer Refer http://chromedriver.storage.googleapis.com/2.23/notes.txt)

Solution : Get chrome version 49 to 52 or downgrade chromedriver to 2.20

Every chromedriver supports a range of chrome versions. We cab check the chrome driver version by running chromedriver -v And then see the chrome versions supported by this version from http://chromedriver.storage.googleapis.com/2.23/notes.txt

0
votes

This Exception occurs because the Chrome Driver version which you using is not compatible with the version of the Chrome Browser. So download the Chrome Driver version which is compatible with you Chrome Version.

You can download from here: Download Chrome Drivers

And place the new driver path and check.

Thanks