Exception Translator Demo

Normally WebDriver adds debug info to the end of the exception message. The fixture for this demo adds an extension that removes this extra information. Note that the stack trace still contains the debug information (which should be included if reporting a bug on the WebDriver mailing list).

Example

Look for a non-existent elementorg.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"class name","selector":"nonExistent"} (Session info: chrome=62.0.3202.94) (Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.9.6-040906-generic x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html

While evaluating expression: clickOnNonExistentLink()

org.concordion.internal.InvalidExpressionException: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"class name","selector":"nonExistent"} (Session info: chrome=62.0.3202.94) (Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.9.6-040906-generic x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:01:39.354Z' System info: host: 'travis-job-concordion-concordion-exc-303216311', ip: '172.17.0.20', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.6-040906-generic', java.version: '1.8.0_144' Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities {acceptSslCerts: true, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.33.506092 (733a02544d189e..., userDataDir: /tmp/.org.chromium.Chromium...}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 62.0.3202.94, webStorageEnabled: true} Session ID: ac9bcf17076352d537cfff224c5f4f96 *** Element info: {Using=class name, value=nonExistent}
at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (NativeConstructorAccessorImpl.java:-2)
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:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed (ErrorHandler.java:166)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue (JsonHttpResponseCodec.java:40)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode (AbstractHttpResponseCodec.java:80)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode (AbstractHttpResponseCodec.java:44)
at org.openqa.selenium.remote.HttpCommandExecutor.execute (HttpCommandExecutor.java:164)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute (DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute (RemoteWebDriver.java:600)
at org.openqa.selenium.remote.RemoteWebDriver.findElement (RemoteWebDriver.java:370)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByClassName (RemoteWebDriver.java:456)
at org.openqa.selenium.By$ByClassName.findElement (By.java:391)
at org.openqa.selenium.remote.RemoteWebDriver.findElement (RemoteWebDriver.java:362)
at org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement (DefaultElementLocator.java:69)
at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke (LocatingElementHandler.java:38)
at com.sun.proxy.$Proxy14.click (Unknown Source)
at org.concordion.ext.demo.selenium.web.GoogleSearchPage.clickOnNonExistentLink (GoogleSearchPage.java:45)
at org.concordion.ext.demo.selenium.ExceptionTranslatorDemo.clickOnNonExistentLink (ExceptionTranslatorDemo.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
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 ognl.OgnlRuntime.invokeMethod (OgnlRuntime.java:872)
at ognl.OgnlRuntime.callAppropriateMethod (OgnlRuntime.java:1295)
at ognl.ObjectMethodAccessor.callMethod (ObjectMethodAccessor.java:68)
at ognl.OgnlRuntime.callMethod (OgnlRuntime.java:1371)
at ognl.ASTMethod.getValueBody (ASTMethod.java:90)
at ognl.SimpleNode.evaluateGetValueBody (SimpleNode.java:212)
at ognl.SimpleNode.getValue (SimpleNode.java:258)
at ognl.Ognl.getValue (Ognl.java:494)
at ognl.Ognl.getValue (Ognl.java:596)
at ognl.Ognl.getValue (Ognl.java:566)
at org.concordion.internal.OgnlEvaluator.evaluate (OgnlEvaluator.java:24)
at org.concordion.internal.SimpleEvaluator.evaluate (SimpleEvaluator.java:12)
at org.concordion.internal.command.executeCommand.ExecuteCommand.normalExecution (ExecuteCommand.java:75)
at org.concordion.internal.command.executeCommand.ExecuteCommand.execute (ExecuteCommand.java:68)
at org.concordion.api.AbstractCommandDecorator$2.run (AbstractCommandDecorator.java:25)
at org.concordion.internal.command.LocalTextDecorator.process (LocalTextDecorator.java:26)
at org.concordion.api.AbstractCommandDecorator.execute (AbstractCommandDecorator.java:23)
at org.concordion.api.AbstractCommandDecorator$2.run (AbstractCommandDecorator.java:25)
at org.concordion.internal.command.ThrowableCatchingDecorator.process (ThrowableCatchingDecorator.java:38)
at org.concordion.api.AbstractCommandDecorator.execute (AbstractCommandDecorator.java:23)
at org.concordion.api.CommandCall.execute (CommandCall.java:72)
at org.concordion.api.CommandCallList.processSequentially (CommandCallList.java:33)
at org.concordion.internal.command.SpecificationCommand.execute (SpecificationCommand.java:36)
at org.concordion.api.CommandCall.execute (CommandCall.java:72)
at org.concordion.internal.XMLSpecification.processNode (XMLSpecification.java:61)
at org.concordion.internal.XMLSpecification.processExample (XMLSpecification.java:78)
at org.concordion.Concordion.processExample (Concordion.java:103)
at org.concordion.internal.FixtureRunner.run (FixtureRunner.java:38)
at org.concordion.integration.junit4.ConcordionRunner.invoke (ConcordionRunner.java:207)
at org.concordion.integration.junit4.ConcordionRunner$1.invoke (ConcordionRunner.java:31)
at org.concordion.integration.junit4.ConcordionFrameworkMethod.invokeExplosively (ConcordionFrameworkMethod.java:58)
at org.junit.internal.runners.statements.InvokeMethod.evaluate (InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunAfters.evaluate (RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf (ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild (BlockJUnit4ClassRunner.java:78)
at org.concordion.integration.junit4.ConcordionRunner.runChild (ConcordionRunner.java:191)
at org.concordion.integration.junit4.ConcordionRunner.runChild (ConcordionRunner.java:23)
at org.junit.runners.ParentRunner$3.run (ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule (ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren (ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000 (ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate (ParentRunner.java:268)
at org.junit.runners.ParentRunner.run (ParentRunner.java:363)
at org.concordion.integration.junit4.ConcordionRunner.run (ConcordionRunner.java:150)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass (JUnitTestClassExecuter.java:114)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute (JUnitTestClassExecuter.java:57)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass (JUnitTestClassProcessor.java:66)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass (SuiteTestClassProcessor.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
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.gradle.internal.dispatch.ReflectionDispatch.dispatch (ReflectionDispatch.java:35)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch (ReflectionDispatch.java:24)
at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch (ContextClassLoaderDispatch.java:32)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke (ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy1.processTestClass (Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass (TestWorker.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
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.gradle.internal.dispatch.ReflectionDispatch.dispatch (ReflectionDispatch.java:35)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch (ReflectionDispatch.java:24)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch (MessageHubBackedObjectConnection.java:146)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch (MessageHubBackedObjectConnection.java:128)
at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run (MessageHub.java:404)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute (ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run (StoppableExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run (ThreadFactoryImpl.java:55)
at java.lang.Thread.run (Thread.java:748)
org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"class name","selector":"nonExistent"} (Session info: chrome=62.0.3202.94) (Driver info: chromedriver=2.33.506092 (733a02544d189eeb751fe0d7ddca79a0ee28cce4),platform=Linux 4.9.6-040906-generic x86_64) (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:01:39.354Z' System info: host: 'travis-job-concordion-concordion-exc-303216311', ip: '172.17.0.20', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.6-040906-generic', java.version: '1.8.0_144' Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities {acceptSslCerts: true, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.33.506092 (733a02544d189e..., userDataDir: /tmp/.org.chromium.Chromium...}, cssSelectorsEnabled: true, databaseEnabled: false, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: , unhandledPromptBehavior: , version: 62.0.3202.94, webStorageEnabled: true} Session ID: ac9bcf17076352d537cfff224c5f4f96 *** Element info: {Using=class name, value=nonExistent}
at sun.reflect.NativeConstructorAccessorImpl.newInstance0 (NativeConstructorAccessorImpl.java:-2)
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:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed (ErrorHandler.java:166)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue (JsonHttpResponseCodec.java:40)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode (AbstractHttpResponseCodec.java:80)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode (AbstractHttpResponseCodec.java:44)
at org.openqa.selenium.remote.HttpCommandExecutor.execute (HttpCommandExecutor.java:164)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute (DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute (RemoteWebDriver.java:600)
at org.openqa.selenium.remote.RemoteWebDriver.findElement (RemoteWebDriver.java:370)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByClassName (RemoteWebDriver.java:456)
at org.openqa.selenium.By$ByClassName.findElement (By.java:391)
at org.openqa.selenium.remote.RemoteWebDriver.findElement (RemoteWebDriver.java:362)
at org.openqa.selenium.support.pagefactory.DefaultElementLocator.findElement (DefaultElementLocator.java:69)
at org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler.invoke (LocatingElementHandler.java:38)
at com.sun.proxy.$Proxy14.click (Unknown Source)
at org.concordion.ext.demo.selenium.web.GoogleSearchPage.clickOnNonExistentLink (GoogleSearchPage.java:45)
at org.concordion.ext.demo.selenium.ExceptionTranslatorDemo.clickOnNonExistentLink (ExceptionTranslatorDemo.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
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 ognl.OgnlRuntime.invokeMethod (OgnlRuntime.java:872)
at ognl.OgnlRuntime.callAppropriateMethod (OgnlRuntime.java:1295)
at ognl.ObjectMethodAccessor.callMethod (ObjectMethodAccessor.java:68)
at ognl.OgnlRuntime.callMethod (OgnlRuntime.java:1371)
at ognl.ASTMethod.getValueBody (ASTMethod.java:90)
at ognl.SimpleNode.evaluateGetValueBody (SimpleNode.java:212)
at ognl.SimpleNode.getValue (SimpleNode.java:258)
at ognl.Ognl.getValue (Ognl.java:494)
at ognl.Ognl.getValue (Ognl.java:596)
at ognl.Ognl.getValue (Ognl.java:566)
at org.concordion.internal.OgnlEvaluator.evaluate (OgnlEvaluator.java:24)
at org.concordion.internal.SimpleEvaluator.evaluate (SimpleEvaluator.java:12)
at org.concordion.internal.command.executeCommand.ExecuteCommand.normalExecution (ExecuteCommand.java:75)
at org.concordion.internal.command.executeCommand.ExecuteCommand.execute (ExecuteCommand.java:68)
at org.concordion.api.AbstractCommandDecorator$2.run (AbstractCommandDecorator.java:25)
at org.concordion.internal.command.LocalTextDecorator.process (LocalTextDecorator.java:26)
at org.concordion.api.AbstractCommandDecorator.execute (AbstractCommandDecorator.java:23)
at org.concordion.api.AbstractCommandDecorator$2.run (AbstractCommandDecorator.java:25)
at org.concordion.internal.command.ThrowableCatchingDecorator.process (ThrowableCatchingDecorator.java:38)
at org.concordion.api.AbstractCommandDecorator.execute (AbstractCommandDecorator.java:23)
at org.concordion.api.CommandCall.execute (CommandCall.java:72)
at org.concordion.api.CommandCallList.processSequentially (CommandCallList.java:33)
at org.concordion.internal.command.SpecificationCommand.execute (SpecificationCommand.java:36)
at org.concordion.api.CommandCall.execute (CommandCall.java:72)
at org.concordion.internal.XMLSpecification.processNode (XMLSpecification.java:61)
at org.concordion.internal.XMLSpecification.processExample (XMLSpecification.java:78)
at org.concordion.Concordion.processExample (Concordion.java:103)
at org.concordion.internal.FixtureRunner.run (FixtureRunner.java:38)
at org.concordion.integration.junit4.ConcordionRunner.invoke (ConcordionRunner.java:207)
at org.concordion.integration.junit4.ConcordionRunner$1.invoke (ConcordionRunner.java:31)
at org.concordion.integration.junit4.ConcordionFrameworkMethod.invokeExplosively (ConcordionFrameworkMethod.java:58)
at org.junit.internal.runners.statements.InvokeMethod.evaluate (InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunAfters.evaluate (RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf (ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild (BlockJUnit4ClassRunner.java:78)
at org.concordion.integration.junit4.ConcordionRunner.runChild (ConcordionRunner.java:191)
at org.concordion.integration.junit4.ConcordionRunner.runChild (ConcordionRunner.java:23)
at org.junit.runners.ParentRunner$3.run (ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule (ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren (ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000 (ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate (ParentRunner.java:268)
at org.junit.runners.ParentRunner.run (ParentRunner.java:363)
at org.concordion.integration.junit4.ConcordionRunner.run (ConcordionRunner.java:150)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.runTestClass (JUnitTestClassExecuter.java:114)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecuter.execute (JUnitTestClassExecuter.java:57)
at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassProcessor.processTestClass (JUnitTestClassProcessor.java:66)
at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass (SuiteTestClassProcessor.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
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.gradle.internal.dispatch.ReflectionDispatch.dispatch (ReflectionDispatch.java:35)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch (ReflectionDispatch.java:24)
at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch (ContextClassLoaderDispatch.java:32)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke (ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy1.processTestClass (Unknown Source)
at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass (TestWorker.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (NativeMethodAccessorImpl.java:-2)
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.gradle.internal.dispatch.ReflectionDispatch.dispatch (ReflectionDispatch.java:35)
at org.gradle.internal.dispatch.ReflectionDispatch.dispatch (ReflectionDispatch.java:24)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch (MessageHubBackedObjectConnection.java:146)
at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch (MessageHubBackedObjectConnection.java:128)
at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run (MessageHub.java:404)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute (ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run (StoppableExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run (ThreadFactoryImpl.java:55)
at java.lang.Thread.run (Thread.java:748)