Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

org.openqa.selenium.SessionNotCreatedException: session not created exception

Tags:

I'm trying to run some Selenium tests using the ChromeDriver, and I started getting this error:

Starting ChromeDriver 2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129) on port 42985 Only local connections are allowed. Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created exception from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"7576.1","isDefault":true},"id":1,"name":"","origin":"://"}   (Session info: chrome=54.0.2840.59)   (Driver info: chromedriver=2.23.409699 (49b0fa931cda1caad0ae15b7d1b68004acd05129),platform=Windows NT 10.0.14393 x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 2.48 seconds Build info: version: 'unknown', revision: '2aa21c1', time: '2016-08-02 14:59:43 -0700' System info: host: 'SUJITH', ip: '192.168.43.228', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_101' Driver info: org.openqa.selenium.chrome.ChromeDriver     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)     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.<init>(RemoteWebDriver.java:130)     at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:143)     at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:170)     at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:159)     at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:116)     at Selenium.Test2.main(Test2.java:15) 

Why is this happening, and how can I fix it?

like image 539
sujith kumar Avatar asked Oct 16 '16 07:10

sujith kumar


People also ask

How do I fix session not created exception?

The solution for this problem is simply to update your chrome driver. Choose chrome driver from the below link that will suit your system architecture. I'm having the same issue, only my chromedriver and chrome browser has been updated to the latest.

What is org Openqa selenium WebDriver?

Describes a series of key/value pairs that encapsulate aspects of a browser. ContextAware. Some implementations of WebDriver, notably those that support native testing, need the ability to switch between the native and web-based contexts. Credentials.

What is session not found exception?

SessionNotFoundException will occur when driver is trying to perform operations on the Web Application after the Browser is closed or when the Browser Session is not available.


1 Answers

Update your chromedriver with lastest version. And please clarify your question.

https://chromedriver.storage.googleapis.com/index.html?path=2.24/

like image 96
cyildirim Avatar answered Sep 20 '22 10:09

cyildirim