0

Program:

Below given is the code snipped i'm tring to run. However it is failing to open the Chrome Browser. Browser just opens and closes in fraction of a secod with the below given exception in the console.

public static void main(String[] args) {
        WebDriver driver = null;
        //Map<String, Object> testDataMap = null;
        try{
            //testDataMap = LoadConfiguration.getTestDataMap();

            System.setProperty("webdriver.chrome.driver","D:\\chromedriver_win32\\chromedriver.exe");
            Thread.sleep(5000l);
            driver = new ChromeDriver();

            //driver = LoadConfiguration.getDriver();

            System.out.println("Opening the Browser");
            driver.get("http://localhsot:5080/myWebSite/8450191#");
            Thread.sleep(2000l);
            System.out.println("Open the Browser");
            System.out.println("");
            System.out.println("Title" +driver.getTitle());

        }catch (Exception ie){
            ie.printStackTrace();
        }finally{
            System.out.println("Quitting the Browser");
            if(null != driver){
                driver.close();
                driver.quit();
            }
        }
    }

Exception:

Starting ChromeDriver (v2.9.248315) on port 13737

org.openqa.selenium.WebDriverException: unknown error: version info not a dictionary
  (Driver info: chromedriver=2.9.248315,platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.99 seconds
Build info: version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:12:12'
System info: host: '01hw535163', ip: '10.72.15.53', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_17'
Driver info: org.openqa.selenium.chrome.ChromeDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:115)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:161)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:107)
    at com.seic.scripts.TestScript.main(TestScript.java:24)

Quitting the Browser

OS: Windows 7, 64 bit Browser Version: 21.0.1171.0 chromedriver=2.9.248315

1 Answer 1

2

Looks like old chrome version is causing this issue. Current chrome version is > 32. Update chrome and give a try.
Source

Sign up to request clarification or add additional context in comments.

1 Comment

Okay. If i wanted to update the chromeDriver version what could be the suitable version??? Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.