Home » Java » java – Exception thrown after getting the expected output-Exceptionshub

java – Exception thrown after getting the expected output-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

I’m getting an Exception like this, after getting the expected output. How can you fix this issue?

org.openqa.selenium.NoSuchSessionException: Tried to run command
without establishing a connection Build info: version: ‘3.141.59’,
revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’ System info: host:
‘exa00034’, ip: ‘127.0.1.1’, os.name: ‘Linux’, os.arch: ‘amd64’,
os.version: ‘4.4.0-173-generic’, java.version: ‘1.8.0_242’ Driver
info: org.openqa.selenium.firefox.FirefoxDriver Capabilities
{acceptInsecureCerts: false, browserName: firefox, browserVersion:
72.0.2, javascriptEnabled: true, moz:accessibilityChecks: false, moz:buildID: 20200117190643, moz:geckodriverVersion: 0.24.0,
moz:headless: false, moz:processID: 23800, moz:profile:
/tmp/rust_mozprofile.wg4fwk…, moz:shutdownTimeout: 60000,
moz:useNonSpecCompliantPointerOrigin: false, moz:webdriverClick: true,
pageLoadStrategy: normal, platform: LINUX, platformName: LINUX,
platformVersion: 4.4.0-173-generic, rotatable: false, setWindowRect:
true, strictFileInteractability: false, timeouts: {implicit: 0,
pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and
notify} Session ID: fd01ba83-446a-4d23-9bdb-e18d45e5953b

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.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at
org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at
org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at
org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:609)
at
org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:452)
at
com.seleniumwebdriver.apisdemo.ApiDemo.WindowSetSizeTest(ApiDemo.java:385)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498) at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366) at
com.github.webdriverextensions.junitrunner.WebDriverRunner.runChild(WebDriverRunner.java:364)
at
com.github.webdriverextensions.junitrunner.WebDriverRunner.runChild(WebDriverRunner.java:103)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) at
org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) at
org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) at
org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) at
org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) at
org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) at
org.junit.runners.ParentRunner.run(ParentRunner.java:413) at
org.junit.runner.JUnitCore.run(JUnitCore.java:137) at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at
com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at
com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)

How to&Answers: